Linus
June 19th, 2003, 19:21
Hello. I have a firewall running OpenBSD 3.2 which redirects the ports 80 and 21 to an internal server. It works fine as long as you're not on the internal network. Everyone outside my internal network can access the server using the domain that points to my IP, but when I try to access it from my internal network I can't. I have to access it using the internal IP (192.168.0.6) which is pretty annoying. Any ideas?
I've included my pf.conf here:
[code:1:a34746d293]
EXT = "ne3"
INT = "ep1"
INT_NET = "192.168.0.0/24"
SERVER = "192.168.0.6"
scrub in all
nat on $EXT inet from $INT/24 to any -> $EXT
rdr on $EXT proto tcp from any to $EXT port 80 -> $SERVER port 80
rdr on $EXT proto tcp from any to $EXT port 21 -> $SERVER port 21
block in on $EXT all
pass in on $EXT proto tcp from any to any port auth keep state
pass in quick on $EXT proto tcp from any to any port 22
pass in quick on $EXT proto tcp from any to $SERVER port 21
pass in quick on $EXT proto tcp from any to $SERVER port 80
pass out on $EXT inet proto icmp from $EXT to any icmp-type 8 code 0 keep state
pass in on $EXT inet proto icmp from any to $EXT icmp-type 8 code 0 keep state
pass out on $EXT proto { tcp, udp } all keep state
pass in on $INT proto { tcp, udp } all keep state
[/code:1:a34746d293]
I've included my pf.conf here:
[code:1:a34746d293]
EXT = "ne3"
INT = "ep1"
INT_NET = "192.168.0.0/24"
SERVER = "192.168.0.6"
scrub in all
nat on $EXT inet from $INT/24 to any -> $EXT
rdr on $EXT proto tcp from any to $EXT port 80 -> $SERVER port 80
rdr on $EXT proto tcp from any to $EXT port 21 -> $SERVER port 21
block in on $EXT all
pass in on $EXT proto tcp from any to any port auth keep state
pass in quick on $EXT proto tcp from any to any port 22
pass in quick on $EXT proto tcp from any to $SERVER port 21
pass in quick on $EXT proto tcp from any to $SERVER port 80
pass out on $EXT inet proto icmp from $EXT to any icmp-type 8 code 0 keep state
pass in on $EXT inet proto icmp from any to $EXT icmp-type 8 code 0 keep state
pass out on $EXT proto { tcp, udp } all keep state
pass in on $INT proto { tcp, udp } all keep state
[/code:1:a34746d293]