Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-24-2002, 01:46 PM
|
#1
|
Member
Registered: Feb 2002
Location: East Coast USA
Distribution: Slackware
Posts: 53
Rep:
|
IPTABLES, MASQ & Red Faction
I'm trying to get a dedicated RF server running on my LAN. I'm having a REALLY hard time finding any help on how to construct my IPTABLES rules to allow my server to be seen, and also to show up on the master list.
The server is running on 192.168.0.4, and I need to have the server show up on my external interface. Any help at all would be awesome, even a HOWTO on general rules for game server would help me out.
I'm running Red Hat 7.2, kernel 2.4 on my Linux gateway, using MASQ to translate connections to/from my LAN.
Thanks a lot 
|
|
|
07-24-2002, 03:00 PM
|
#3
|
Member
Registered: Feb 2002
Location: East Coast USA
Distribution: Slackware
Posts: 53
Original Poster
Rep:
|
Thanks neo, I'll check that out. You think this will allow me to run a server from inside my LAN then? I can play fine -- it's the serve I need
Thanks again!
|
|
|
07-24-2002, 03:32 PM
|
#4
|
Member
Registered: Jul 2002
Posts: 143
Rep:
|
What ports does the server use? All you need is to forward them into the LAN and prolly allow pings to show in the master server list.
|
|
|
07-24-2002, 03:44 PM
|
#5
|
Member
Registered: Feb 2002
Location: East Coast USA
Distribution: Slackware
Posts: 53
Original Poster
Rep:
|
I think port 7755, I'm just not sure about the rule... I still haven't mastered iptables and I haven't found much hunting on google...
Thanks, I'll keep reading up 
|
|
|
07-24-2002, 04:49 PM
|
#6
|
Member
Registered: Jul 2002
Posts: 143
Rep:
|
iptables -t nat -A PREROUTING -p tcp -i $EXTIF --dport 7755 -j DNAT --to 192.168..
iptables -t nat -A PREROUTING -p udp -i $EXTIF --dport 7755 -j DNAT --to 192.168..
Just replace extif with the interface on your machine, ppp0 for dsl or eth0 for cable.
|
|
|
07-25-2002, 08:20 AM
|
#7
|
Member
Registered: Feb 2002
Location: East Coast USA
Distribution: Slackware
Posts: 53
Original Poster
Rep:
|
Awesome! Thanks so much turnip  I'll try these rules out tonight; might sound simple to you but I just haven't been able to get the correct rules down
Hopefully RF plays nice...
Thanks again 
|
|
|
08-20-2003, 12:56 PM
|
#8
|
Member
Registered: Feb 2002
Location: Orlando
Distribution: Whatever I feel like at the time I install.
Posts: 284
Rep:
|
I don't like to set it to use the port 7755 b/c it can cause problems with other servers running on port 7755. So I use a randomly high number and these are the two lines needed to make it work.
iptables -I FORWARD -i eth1 -o eth0 -p udp --dport xxxx -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
iptables -t nat -I PREROUTING -p udp --dport xxxxx -j DNAT --to 192.168.168.yyy
where xxxxx is the port number you want to use
and yyy is the IP of the system you want to run the server on
eth1 is the external NIC in your router and eth0 is your internal NIC
You don't need to enable the tcp on these ports as many games these days don't use tcp but rather use udp.
|
|
|
All times are GMT -5. The time now is 06:17 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|