SRCDS Steam group

Internal routing
Internal routing. Is it possible to do that on linux so all traffic through in/out will be forwarded to an internal ip.

^ mainly so i dont have to buy a new router Smile
Need some more info, your post is a bit confusing to me lol, sorry
[Image: b_350x20_C002748-004880-FFFFFF-000000.png]
haha ..

Thats what i expected.

Incoming comes through and my idea is that it is rerouted to Both incoming and outgoing connections should go through some sort of 'internal router' on the server.
It's probably possible to do with iptables.

Tell more about your LAN / network configuration. It may be possible that plain old NAT will do it for you.

There are many good documentation / tutorials about using iptables. More than ~everything is usually possible with iptables. Take a look at this diagram for example:

You can for example change the address which your own server thinks the packets are coming or going to. You can do the change before (PREROUTING) or after (POSTROUTING) the kernel internally routes the packet.
My server is directly connected to internet...

will look at those tuturials.
lhffan Wrote:My server is directly connected to internet...

why do you need this then? (Linux Kernel HOWTO!)
Do not ask technical questions via PM!
I have a dynamic ip and it´s to avoid buying a router
nat can solve your problem, just do it on the border machine, something like iptables -t nat -p tcp --dport yourporthere -j DNAT --to-destination youriphere, and u're done.
@ Dorina
The game server doesn't use tcp. Your instruction doesn't work.

lhffan hasn't told enough about his network setup, so it's kind of blind shooting to try to tell him any instructions. I asked him to tell more, but he blatantly said his computer is connected to internet. He's not getting any help with that - not because nobody wants to, but because it's impossible.
Realy dont know what to answer. English is not my native language.

My gameserver is directly connected to 30/30 broadband connection. It is a dynamic ip connection that gets it ip and more from my isp´s dhcp server.

The server is a srcds linux, i have 1 network card. That is eth0

What more info does you need, please?
The IP on eth0 is 94.244.x.x. What is the 192.168.x.x network then? Where does that come from?

94.244.x.x = eth0
192.168.x.x = ????

Why don't you just run srcds on your public IP? Do you have other computer in the same network with IP address like 192.168.x.x? Do you want to host local LAN game server with IP 192.168.x.x for your local LAN players, but also allow players from internet?

I'm quite sure this situation is possible to solve with normal NAT, but let's first hear what's the LAN setup is like.
Can answer one question directly. My ip changes now and then not so damn often but it is irritating to stop server and change ip. 2 other computer with different ip´s on the same network. Everything is behind a switch. I would only like to get players from internet.

ip on eth0 is 94.255.x.x and at the moment there is no 192.168.x.x.... i have only 1 network card in that box.
Start your server without +ip 94.255.x.x parameter. That'll do it. Then the server will listen, which means no matter what's the IP, the server receives data to the port 27015.

If this is already what you do or this doesn't work, then you're out of luck. (At least for now. If it's really needed, then it'd be possible to set special "eth0:1" interface on your network card, set that interface to and route all packets to 94.255.x.x to the eth0:1 device. Then do normal NAT and it'd seem like you'd have internal server in your LAN, although you're running it on the same computer. I hope and believe this isn't needed, because it'd be kind of stupid - but that's not the weirdest config we've seen here Smile

(PS. The weirdest / most cool was someone who did really cool double-NAT system which actually worked. I never believed he could pull it off, but he did Smile. He had basic NAT done twice in his network. I don't remember the exact details, but I went through quite lengthy thread with him. He had lots of Linux experience - although he didn't admit it - so that's pretty much why he succeeded.)
Quote:Start your server without +ip 94.255.x.x parameter. That'll do it. Then the server will listen, which means no matter what's the IP, the server receives data to the port 27015.

Hope it works. But if i have 2 servers on the same box. Should i add port in the startup line and if how?
Yes, like this:

Server 1: ./srcds_run -game cstrike -port 27015 +map de_dust2
Server 2: ./srcds_run -game cstrike -port 27016 +map de_dust2

Forum Jump:

Users browsing this thread: 1 Guest(s)