Port forwarding

Budec budec at qwest.net
Mon Jan 12 17:55:09 PST 2004




Hello,

I have been trying to get this working for days and am obviously doing
something wrong and was wondering if any Guru's out there could give a
little guidance.  Basically I'm looking to run a game server behind a
FreeBSD firewall.  Here is my setup:

{internet} <-> [public address] - Firewall <-> (internal address) Game
server

Lets say public address is 1.2.3.4 and private address is 192.168.17.25
port is 5122


In the /etc/rc.conf I set the firewall policy to "OPEN" and enabled natd, I
gave it the natd options of "-f /etc/natd.conf"... for "ipnat" I have that
set to "NO" (not sure what it does)

In the natd.conf file I have this:

        redirect_port tcp 192.168.17.25:5122 5122
        redirect_port udp 192.168.17.25:5122 5122

I restart natd and theatrically everything that hits 1.2.3.4 on port 5122
should be automatically redirected to 192.168.17.25 port 5122, right?

I have also tried this (since the public interface is aliases (has more than
one public address associated with it)):

        redirect_port tcp 192.168.17.25:5122 1.2.3.4:5122
        redirect_port udp 192.168.17.25:5122 1.2.3.4:5122



Which doesn't seem to work either.  Any ideas?

Regards,
Jack





More information about the freebsd-questions mailing list