ipnat port redirection can't through 2 subnetworks??

wsk wsk at gddsn.org.cn
Thu Jul 7 08:15:53 GMT 2005


hi,folks:
here's my network's layout:

                              |
                              |
                             em0 (160.79.174.99/29)
                              GateWay (FreeBSD 5.x ipf/ipnat, gateway_enabled)
                             em1 (192.168.1.1/25)
                              |
                              |
  em0 (192.168.1.126/25) -- Bridge --   em1 (192.168.1.254/25)
	|                   		      |
	|				      |
       LAN1				     LAN2  
        |				      |
 +---------------------+	    +---------+---------+
 |                     |	    |         |         |	
hostA(192.168.1.2/25) ...	 		        hostB(192.168.1.250/25)
WEB Server 						Mail Server

and here's the ipnat.rules on my gateway box
   map em0  192.168.1.0/24 -> 160.79.174.99/32 portmap tcp/udp 10000:60000
   map em0  192.168.1.0/24 -> 160.79.174.99/32
   rdr em0  160.79.174.99/32 port 80 -> 192.168.1.2 port 80
   rdr em0  160.79.174.99/32 port 25 -> 192.168.1.250 port 25
now the problems is that the NAT work fine but the port redirection does not
work on IPNAT and PF.and I found that the port redirection just could work
on the same subnetworks(the rdr could forwarding the port to Bridge box but not
WEB Server or Mail Server).so I wondered could I setup the rdr rules to make it
forwarding ports to my LAN1 or LAN2's hosts ?? :-(  thanks any reply with appreciates!!

LAN1's defaultroute is 192.168.1.126
LAN2's defaultroute is 192.168.1.254
Bridge defaultroute is 192.168.1.1



More information about the freebsd-net mailing list