LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Games
User Name
Password
Linux - Games This forum is for all discussion relating to gaming in Linux.

Notices


Reply
  Search this Thread
Old 12-09-2004, 10:08 AM   #1
nikon
LQ Newbie
 
Registered: Nov 2004
Location: Poland
Distribution: Slackware
Posts: 6

Rep: Reputation: 0
Quake 3 - NAT problem?


Hello!

Our network consists of two computers. One server, one workstation. We are connecting to the Internet by ADSL with dynamic ip. The problem is, that when we try to play Quake 3 online everything is fine on the server machine, but a problem occurs when we try to play on the workstation (we can connect to Internet servers, but after connection we have "Connection interrupted" message all the time). Everything but Quake works fine (www, Starcraft, mail, ssh, ICQ, etc.).

Our masquerade file looks like this:

Code:
#!/bin/sh
echo "1" > /proc/sys/net/ipv4/ip_forward
# Czyszczenie tablic iptables (NAT i Filtrowanie)
iptables -F -t nat
iptables -X -t nat
iptables -F -t filter
iptables -X -t filter

iptables -t filter -P FORWARD DROP
iptables -t filter -A FORWARD -s 192.168.0.0/255.255.255.0 -d 0/0 -j ACCEPT
iptables -t filter -A FORWARD -s 0/0 -d 192.168.0.0/255.255.255.0 -j ACCEPT

iptables -t nat -A POSTROUTING -s 192.168.0.2 -d 0/0 -j MASQUERADE

# Moduly do FTP i IRCa
modprobe ip_nat_ftp
modprobe ip_nat_irc
We think the problem is port forwarding.

Any suggestion? Thx for any help!

Regards
 
Old 12-10-2004, 07:06 AM   #2
SonJelfn
Member
 
Registered: Aug 2003
Location: Sendai, Japan
Distribution: Slackware, Slackware64, Debian
Posts: 63

Rep: Reputation: 17
Since you are NATing this line is not necessary:

iptables -t filter -A FORWARD -s 0/0 -d 192.168.0.0/255.255.255.0 -j ACCEPT

This is because the packets that enter your machine will have a destination that is the same as your dynamic IP at that moment. Since you don't have a match in the NAT chain that translates your dynamic IP to your internal network, this line is useless.

Instead, before this line:

iptables -t filter -A FORWARD -s 192.168.0.0/255.255.255.0 -d 0/0 -j ACCEPT

I would add:

iptables -t filter -A FORWARD -m state --state ESTABLISHED, RELATED -j ACCEPT

This might solve your problem since what I think is wrong is that the first connection passes (letting you actually connect to the Internet servers) but when the server tries to create related connections for the actual game, there is no match to accept the incoming packet.

Anyway give that a try. If you have any questions feel free to ask me.
Good luck.
 
Old 12-12-2004, 01:36 PM   #3
nikon
LQ Newbie
 
Registered: Nov 2004
Location: Poland
Distribution: Slackware
Posts: 6

Original Poster
Rep: Reputation: 0
It still doesn't work
I've read all the iptables manuals but i can't find what i did wrong with this script.
please help me
Regards,
 
  


Reply



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
Susefirewall2 Nat Problem / nat 1:1 trubi Linux - Distributions 0 07-20-2004 05:50 AM
Problem running Quake J_angel2000 Linux - Newbie 4 04-14-2004 07:00 AM
New Quake 3 problem Air-Falcon Linux - Games 3 11-30-2003 09:11 AM
Quake 3 Mouse Problem flaK Slackware 8 04-11-2003 01:55 AM
quake 2 problem php Linux - General 0 10-10-2002 10:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Games

All times are GMT -5. The time now is 01:19 PM.

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