Computing.Net > Forums > Linux > C&C Generals and linux firewall

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

C&C Generals and linux firewall

Reply to Message Icon

Name: Mike
Date: February 12, 2003 at 12:35:29 Pacific
OS: Slackware
CPU/Ram: AMD, 512MB
Comment:

I am running a slackware 8.1 linux release, with gShield firewall, and iptables, I am not expert in linux but I am able to get around, and that. Most games up to this point I have been able to forward the ports, and they work, but with C&C Generals I setup all the ports, but I still can't connect, their readme says the follow:


2.10. Firewall/NAT Port Number Info:

The game will need to talk to external servers that use the following port numbers. These ports need to be open in your firewall in order to play on Generals Online:

TCP ports:
80, 6667, 28910, 29900, 29920

UDP ports:
4321, 27900

If your firewall does not allow outgoing packets to open ports to incoming traffic, or you experience problems connecting to other players, you will have to specify which port you want Command & Conquer Generals to use for communicating with other players. To do this, perform the following steps.

Go to your “My Documents” directory, and go to the “Command and Conquer Generals Data” directory. Right click on the options.ini file and choose "Edit."

Look for the "FirewallPortOverride" entry. If you don’t see this entry, add it as a new line. Then assign the port you want to use to the port override entry. After making this change, this entry should look like:

FirewallPortOverride = XXXX

Where XXXX is the port number you have chosen. You will need to open the chosen port in your firewall for communication with players external to your firewall or NAT device. If you use the port override feature, the port you have chosen can not be masqueraded by a NAT device.

So I setup the forwards in the config file(forwards, in Firewall/conf)

0/0 tcp 0/0:6667 192.168.73.2:6667
and so on, reload the firewall, and I can't connect, so any ideas on what is the problem?

and just a note, I am not doing the online, just direct connect to another friends ip, who everyone else can connect to him, and when I plug my non-linux computer into the cable modem instead of the firewall, all is well




Sponsored Link
Ads by Google

Response Number 1
Name: Oliver
Date: March 18, 2003 at 08:39:27 Pacific
Reply:

Hi Mike,

i can play online. But i cant connect to a frind on direct connect. :-( He is connect to my IP cant connect, too.

Online i can play :-))) My iptables:

iptables -A INPUT -s 192.168.1.10 -p udp --destination-port 4321 -j ACCEPT
iptables -A INPUT -s 192.168.1.10 -p udp --destination-port 27900 -j ACCEPT
iptables -A INPUT -s 192.168.1.10 -p tcp --destination-port 80 -j ACCEPT
iptables -A INPUT -s 192.168.1.10 -p tcp --destination-port 6667 -j ACCEPT
iptables -A INPUT -s 192.168.1.10 -p tcp --destination-port 28910 -j ACCEPT
iptables -A INPUT -s 192.168.1.10 -p tcp --destination-port 29900 -j ACCEPT
iptables -A INPUT -s 192.168.1.10 -p tcp --destination-port 29920 -j ACCEPT

iptables -A OUTPUT -p udp --destination-port 4321 -d 192.168.1.10 -j ACCEPT
iptables -A OUTPUT -p udp --destination-port 27900 -d 192.168.1.10 -j ACCEPT
les -A OUTPUT -p udp --destination-port 27900 -d 192.168.1.10 -j ACCEPT
iptables -A OUTPUT -p tcp --destination-port 80 -d 192.168.1.10 -j ACCEPT
iptables -A OUTPUT -p tcp --destination-port 6667 -d 192.168.1.10 -j ACCEPT
iptables -A OUTPUT -p tcp --destination-port 28910 -d 192.168.1.10 -j ACCEPT
iptables -A OUTPUT -p tcp --destination-port 29900 -d 192.168.1.10 -j ACCEPT
iptables -A OUTPUT -p tcp --destination-port 29920 -d 192.168.1.10 -j ACCEPT

Have fun to play online. Plase can everywon write me to i can play direct connect. Thanks alot. Greets Oli


0

Response Number 2
Name: hunter
Date: March 29, 2003 at 13:33:14 Pacific
Reply:

i´ve got a similar problem, i have a home network with 2 pc, the server running windows me and internet connection sharing and the client one running windows xp. when i try to play generals from the client machine it gives me a time out error and i can´t join the game, the only way that works it´s by connecting the xp machine to the modem directly.
so, i want to know if there´s a way to play generals without all this trouble. i mean, mapping the ports or something with ICS. with other games i have no problems joining direct ip games, even with age of empires when i play on the msn zone
any hints to solve this problem?
thanks in advance



0

Response Number 3
Name: Bryan
Date: March 30, 2003 at 20:52:17 Pacific
Reply:

I too am having a similar problem. I have a machine running XP sitting behind a Netgear router. I have opened all the ports listed both by the firewall documentation and mike's message, to no avail. It works fine when I hook my machine up directly to the DSL modem however. I have run a packet sniffer, and the only ports that I see it even trying to use are UDP 8086 and 8088, regardless of the "port override" setting that EA recommends in the options.ini. I've run the packet sniffer throughout a complete game, and those are the only two ports that I can see being used.

When I hook my machine back up to the Netgear router and try to connect again, it still shows all traffic being sent out on UDP port 8086. I set up forwarding rules for this port and tried again. Now I can get communication between both machines on port 8086, but the game still times out. Anybody else have any ideas?


0

Response Number 4
Name: hunter
Date: March 30, 2003 at 22:21:17 Pacific
Reply:

hello, a friend told me he has a network with 2 pcs, but both running xp and he can join games from both, but i think its because xp has built in nat, so it fowards the ports directly...
i also have windows me on the server, and xp on the client, i can´t put xp on the server because it will run too slow since its a pentium 1


0

Response Number 5
Name: eugene259
Date: March 31, 2003 at 22:49:42 Pacific
Reply:

I have come across the same problem trying to play direct connect. I have a linux internet machine running kernel 2.2.24 (redhat 7.0). I thought I could get around it with packet forwarding. I set it up like so:
# forward all traffic from server machine to my-machine
# mark all traffic from server machine
ipchains -I forward -d server-ip/32 -s my-ip/32 -j MASQ
# forward all marked packets to my machine
ipchains -I input -s server-ip/32 -m 3
ipmasqadm mfw -I -m 3 -r 192.168.my.ip

A friend of mine setup server for me and he says that after I did this he could see me join but I still do not get anything on my side... Maybe the client (me) sends the server its ip and then server tries to open a port on the clients ip. If this is the case the client sends the local net ip (192.168...) which server can never open so the client never gets a reply and there is nothing we can do... This is just speculation though. Anyone had any more luck with this?


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: C&C Generals and linux firewall

Class C to Class A thru Linux firewall www.computing.net/answers/linux/class-c-to-class-a-thru-linux-firewall/4676.html

How to run c program in linux www.computing.net/answers/linux/how-to-run-c-program-in-linux/28558.html

C compiler for linux www.computing.net/answers/linux/c-compiler-for-linux/11878.html