natd over ipfw2 problem.

Denis Borisov denb at front.ru
Mon Aug 11 03:12:36 PDT 2003


Hi,  All
I want redirect incoming traffic to internal server.
Why natd don't redirect packet?
OS - FreeBSD 5.1-CURRENT 


192.168.0.104
           |
           |
           |
192.168.0.102
|     router      |
172.16.0.102
           |
           |
           |
172.16.0.253
internal  server

#ipfw add divert 7777 ip from 172.16.0.253 to any out
#ipfw add divert 6666 ip from any to 192.168.0.102 in
#ipfw sh
00100    0      0 divert 7777 ip from 172.16.0.253 to any out
00200    0      0 divert 6666 ip from any to 192.168.0.102 in
65535 3363 607801 allow ip from any to any
#natd -v -u -m -a 192.168.0.102  -i 6666 -o 7777 -redirect_address             
172.16.0.253  192.168.0.102
In  [TCP]  [TCP] 192.168.0.104:49155 -> 192.168.0.102:80 aliased to
                  [TCP] 192.168.0.104:49155 -> 172.16.0.253:80
^C

Why natd don't changes source IP address?
Where OUT chain?

------------------------
Regards,
Denis Borisov


More information about the freebsd-ipfw mailing list