[mohaa] mohaa behind ipchains

Greg Miller gmiller at oei-tech.com
Wed Jul 24 09:08:30 EDT 2002


Kis KeMa wrote:

> Hello,
>
> Which ports use the moha:a? Because I setting accept the 12203 standard port in my ipchains rules but I can't connect to server. :( When I start the moha dedicalt server I see that the port is 12203!
>
> my rules:
> -A input -p tcp -s any $unpriv_ports -d $myip 12203 -j ACCEPT
> -A output -p tcp ! -y -s $myip 12203 -d any $unpriv_ports -j ACCEPT
>
> Should I setting any other rules?
>
> bye
>
> KeMa
> [MT_wss]
>
> --
> Pro Patria!

# this bit of BASH code worked for me in the past, i also have an IPTABLES
#  equivalent if  needed
# IPADDR is simply your IP address
# EXTERNAL_INTERFACE is either eth0 or eth1

ENABLE_MOH_FORWARDING="no"
MOH_SERVER_PORTS="12203 12300 12303"
for P in $MOH_SERVER_PORTS; do
  if [ "$ENABLE_MOH_FORWARDING" = "no" ] ; then
    ipchains -A input -i $EXTERNAL_INTERFACE -p udp \
      -s $ANYWHERE $UNPRIVPORTS \
      -d $IPADDR $P
    ipchains -A output -i $EXTERNAL_INTERFACE -p udp \
      -s $IPADDR $P \
      -d $ANYWHERE $UNPRIVPORTS
  else
    ipmasqadm portfw -a -P udp -L $IPADDR $P -R $WORKSTATIONIP $P
  fi
done



--
name:Greg C. Miller
title:Systems and Network Administrator/Sr. Analyst
e-mail:gmiller at oei-tech.com
url:http://www.oei-tech.com/
voice:(540) 373-6025
fax:(540) 899-5471

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


More information about the Mohaa mailing list