[mohaa] Need Help

Heikki Kokko heikki.kokko at tromso.online.no
Sun Nov 17 13:18:08 EST 2002


Ouch. New to linux.

Well, here comes the bible.

OK, you have iptables firewall, which means you probably run the server
in your internal network with internal adresses, right?

If not, just forget about the rest of this and see first that you can connect
the game from your intenal network. However, if the game announces 
itself in gamespy, the server should be up and running ok.

You probably have also set up NAT (network address translation)/IPMasq
on your firewall, so when the server gives an outbound notification to
gamespy, that goes fine. The inbound traffic doesn't com through, if you
don't set it spesifically up in iptables.

You need two things in your iptables script for each tcp & udp port you
want to forward from your firewall: prerouting & portforwarding.

You need to add most of the following in your existing iptables script.
Check out /etc/rc.d/rc.firewall, I don't remember where stock RH 8.0
install generates this. 

The usual stuff goes in here: Know and understand what you're doing,
do it right, not wrong, and I take not reponsibility whatsoever. :-)
---------------------------------------------------------------------------
# Variables: 
# your location of iptables program (probaly set up already)
IPTABLES=/sbin/iptables

# your external ip address (static or dhcp, on you firewall, from yout ISP)
# YOU HAVE TO FILL THIS IN
$EXTIF_IP=

# the internal ip address on the machine whre your MOHAA server runs
# CORRECT THIS TO MATCH YOURS
$INTERNAL=192.168.0.5

# Medal of Honor-port:
# (some sources have it that you should have 
# more ports open, but this should do).
# In case your email client word-wraps this: 
# ONLY TWO LINES FOLLOWS HERE
$IPTABLES -t nat -A PREROUTING -p udp -d $EXTIF_IP --dport 12203 -j DNAT --to $INTERNAL:12203
$IPTABLES -A FORWARD -p udp -d $INTERNAL --dport 12203 -j ACCEPT

---------------------------------------------------------------------------------------
After running the script (for eample  ./rc.firewall) You can observe
the result with iptables -L
And oh yes, you must be root or do su before you are allowed to
change this on your firewall.

You shouldn't need to do anything on the linux machine where 
the game runs - if it's not the same machine which is the
firewall. In that case all of this with iptables should be
unnecessary.

There's a lot of good stuff about the iptables in the internet,
try for example http://iptables-tutorial.haringstad.com

Good luck and happy gaming.
Heikki
  ----- Original Message ----- 
  From: Magnus Wiberg 
  To: mohaa at icculus.org 
  Sent: Sunday, November 17, 2002 6:01 PM
  Subject: [mohaa] Need Help


  Im trying to set up a Linux Server to run my MOHAA server on.

  System spec.
  Red hat 8.0
  2 nics 

  Services on server
  Firewall. (Iptables)

  Problem.
  Users cant connect.

  Ther server shows up in Gamespy/ASE but people cant connect.

  I have set host name in /etc/hosts/ to my external IP.

  Any more info you people need just answer my post.

  Iam new to linux so i need good instruction on how to do things.

  Desperate for Answers 
  /Magnus Wiberg


------------------------------------------------------------------------------
  Få ut mesta möjliga av webben. Hämta MSN Explorer UTAN KOSTNAD på: http://explorer.msn.se

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/mohaa/attachments/20021117/587181de/attachment.htm>


More information about the Mohaa mailing list