I have been using IPFilter with ipnat and inserted the rules, but it says it doesn't understand bimap.
The post mentioned using these rules:
rdr rl1/32 from any to rl1/32 port 9000 -> 192.168.0.47 port 9000
rdr rl1/32 from any to rl1/32 port 9001 -> 192.168.0.47 port 9000
binat on rl1 from 192.168.0.47 to 207.46.203.0/24 -> rl1
binat on rl1 from 192.168.0.47 to 207.46.204.0/24 -> rl1
However my ipnat didn't like this (it said no mask on LHS) so I changed the first two lines to:
rdr rl1 207.46.204.0/32 port 9000 -> 192.168.0.47 port 9000
rdr rl1 207.46.204.0/32 port 9001 -> 192.168.0.47 port 9000
which it translated as: sudo ipnat -l List of active MAP/Redirect filters: map rl1 192.168.0.0/0 -> 0.0.0.0/32 map rl1 192.168.0.0/0 -> 0.0.0.0/32 rdr rl1 207.46.204.0/32 port 40 -> 192.168.0.47 port 9000 tcp rdr rl1 207.46.204.0/32 port 40- 41 -> 192.168.0.47 port 9000 tcp
I don't know where port '40' came from.
So, I wrote out the rules and restarted it: sudo ipnat -FC -f /etc/ipnat.rules 0 entries flushed from NAT table 4 entries flushed from NAT list 16: unknown mapping: "binat" 16: syntax error in "binat" /etc/ipnat.rules: parse error (-1), quitting
I upgraded to the latest stable ip-filter ipf -V ipf: IP Filter: v3.4.33pre1 (336)
But I still get the binat error and now my FreeBSD 4.7 server is not natting anything at ALL!
I removed all the new rules and just left in:
map rl1 192.168.0.0/16 -> 0/32 portmap tcp/udp 1025:65000
map rl1 192.168.0.0/16 -> 0/32
But it's still not nat'ing even after a reboot.
Regards,
Jason.
-------------------------- Jason Oakley +612 82821434 Open and Intel Systems Systems Administrator http://www.eds.com
Add a dab of lavender to milk
Leave town with an orange
and pretend you are laughing at it
