LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 08-13-2004, 01:01 AM   #1
Glus
LQ Newbie
 
Registered: Aug 2004
Posts: 2

Rep: Reputation: 0
Fedora core 2 as a router and hosting warcraft 3 games?


I am trying to set up some routing on my linux box. This linux box serves as a router mostly. I want to host battlenet games, and I got to the point where I can, but I have to apply some settings after I connect to bnet, otherwise I cannot connect to bnet at all. Here is what i have:

iptables -t nat -F
iptables -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
iptables -A FORWARD -j
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE
iptables --append FORWARD --in-interface eth1 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward

This above section allows me to connect to bnet and anythign else(from my windows box, and linux box), but I cannot host games, can only join games.

If I enter the following after I am already connected to battlenet, I can host:

iptables -t nat -A PREROUTING -p UDP --dport 6112 -j DNAT --to-destination 192.168.0.2:6112
iptables -t nat -A PREROUTING -p TCP --dport 6112 -j DNAT --to-destination 192.168.0.2:6112

But after I exit battlenet, I have to reenter the first section, or I cannot even connect to battlenet, and then to host a game again, I have to reenter the second section again, and so on.

My setup consists of:

192.168.0.2 static ip for windows 2000 box

192.168.0.1 for the linux box

linux box has ppp0 which is connected to one nic, and the other nic connects to the windows pc.

I want to combine these 2 sections, so they both work at same time, without me needing to enter second one after I am already connected and so on. Basically how do I make iptables permit all that is in those 2 files combined ? Because as it is now, the second set of commands overwrites somethign in first set of commands, and I want both sets of commands to be active at same time.

The linux box is fedora core 2 with 2.6.7-1.494.2.2 kernel, currently no firewall software running.

Thank you in advance.
 
Old 08-13-2004, 01:28 PM   #2
Glus
LQ Newbie
 
Registered: Aug 2004
Posts: 2

Original Poster
Rep: Reputation: 0
Ok, I went through this stuff again and tried to clean it up a bit, The section that allows me connectivity to anything from my win2k box now looks like this:

iptables -t nat -F
iptables -F

iptables -A FORWARD -i eth1 -o eth0
iptables -A FORWARD -i eth0 -o eth1
iptables -A INPUT -i eth0 -j ACCEPT
iptables -A INPUT -i eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE

(I also edited /etc/sysctl.conf to have net.ipv4.ip_forward=1)

With just the above I can connect to battlenet and join games, but I cannot host.

Once I am connected to battlenet, I can run this:

iptables -t nat -A PREROUTING -p UDP --dport 6112 -j DNAT --to-destination
192.168.0.2:6112
iptables -t nat -A PREROUTING -p TCP --dport 6112 -j DNAT --to-destination
192.168.0.2:6112

And then I can host games as well as join games. But when I exit from battlenet, I cannot connect to it again, unless I rerun the first group of commands, and then once connected I cannot host games until i run the second group of commands.

How can I combine these 2 sections so I do not have to run anything while already connected to battlenet?
 
  


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
World of Warcraft, wine and Fedora Core 3 thanquol Linux - Games 5 02-03-2006 03:13 AM
games in fedora core 3 fbs2003 Linux - Software 9 06-12-2005 11:16 PM
Warcraft 3, wine LAN games? trey85stang Linux - Games 1 12-27-2004 10:10 PM
Fedora Core 1 and games @ pogo web site bav Fedora 3 08-21-2004 12:24 PM
Fedora core 2 + warcraft 3 + winex3 = Super lag Can any one help me fix this? fourevilmonkies Linux - Games 5 07-28-2004 04:08 AM

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

All times are GMT -5. The time now is 03:02 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration