[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Help with NAT/redirection
Dear list.
I need help setting up a OpenBSD 3.1 (i386) gateway doing NAT.
Below is my config-files - it's is really just copy/paste from the FAQ,
but I cannot get redirection to work.
The gateway has two NIC's; xl0 (external) and xl1 (internal). xl0 has a
static valid routable IP/submask from my ISP. xl1 has IP 192.168.1.1
submask 255.255.255.0.
There are no error messages during bootup, the NIC's are both alive and
pingable from either side of the gateway. NAT itself is working (users
on the internal network can access the internet) but redirection is not
(no access to the internal server on 192.168.1.2 from the outside - all
is well from the inside)
What am I doing wrong? Any help is greatly appreciated.
TIA, Henrik.
pf.conf:
pass in all
pass out all
nat.conf:
nat on xl0 from 192.168.1.0/24 to any -> extip
rdr on xl0 from any to extip/32 port portno -> 192.168.1.2 port portno
nat.conf legend:
xl0 = The external interface
extip = IP-no. of the external interface (form: x.x.x.x)
portno = The port number I want to redirect to the internal server on
192.168.1.2
sysctl.conf (line i've edited from default):
net.inet.ip.forwarding=1
rc.conf (line i've edited from default):
pf=YES