Hello,
I've got a freebsd box acting as a router/nat gateway using ipfilter.
I've got a box behind it 192.168.0.1 to which i want all external ssh
traffic to go to except if it comes from a specific ip and if any ssh
connections come from that IP to redirect to 192.168.0.2. I can ssh out to
the box but when i try to ssh back in from that box i hit my first machine
and not the second. My rule list looks like this:
ipf.rules:
pass in quick on ep0 proto tcp from 111.222.333.444/32 to 192.168.0.2 port =
22 flags S keep state
pass in quick on ep0 proto tcp from any to 192.168.0.1 port = 22 flags S
keep state
ipnat.rules:
rdr ep0 111.222.333.444/32 port 22 -> 192.168.0.2 port 22 tcp
rdr ep0 0.0.0.0/0 port 22 -> 192.168.0.1 port 22 tcp
Any help appreciated.
Dave.