LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-24-2002, 01:46 PM   #1
Tekime
Member
 
Registered: Feb 2002
Location: East Coast USA
Distribution: Slackware
Posts: 53

Rep: Reputation: 15
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
 
Old 07-24-2002, 02:48 PM   #2
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
try stronger firewall from http://www.tldp.org/HOWTO/IP-Masquer...-examples.html
just read through it, and configure it to reflect your system.
 
Old 07-24-2002, 03:00 PM   #3
Tekime
Member
 
Registered: Feb 2002
Location: East Coast USA
Distribution: Slackware
Posts: 53

Original Poster
Rep: Reputation: 15
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!
 
Old 07-24-2002, 03:32 PM   #4
turnip
Member
 
Registered: Jul 2002
Posts: 143

Rep: Reputation: 15
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.
 
Old 07-24-2002, 03:44 PM   #5
Tekime
Member
 
Registered: Feb 2002
Location: East Coast USA
Distribution: Slackware
Posts: 53

Original Poster
Rep: Reputation: 15
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
 
Old 07-24-2002, 04:49 PM   #6
turnip
Member
 
Registered: Jul 2002
Posts: 143

Rep: Reputation: 15
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.
 
Old 07-25-2002, 08:20 AM   #7
Tekime
Member
 
Registered: Feb 2002
Location: East Coast USA
Distribution: Slackware
Posts: 53

Original Poster
Rep: Reputation: 15
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
 
Old 08-20-2003, 12:56 PM   #8
bbenz3
Member
 
Registered: Feb 2002
Location: Orlando
Distribution: Whatever I feel like at the time I install.
Posts: 284

Rep: Reputation: 30
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
FTP using TLS via masq / iptables RetroJohn Linux - Networking 6 10-29-2004 05:50 AM
Lil' IPTABLES-MASQ QUESTION azornoz Linux - Networking 3 10-17-2003 04:55 PM
iptables masq eth0,1,2,3 garvald Linux - Networking 0 08-06-2003 07:37 AM
Quick Q's on IPTables/Masq tarballed Linux - Security 5 12-15-2002 05:47 AM
red hat 7.1 ip masq davinci Linux - Networking 1 10-01-2001 02:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration