This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Can't get NAT to work

I am new to Astaro and everything else seems to work okay except the NAT. Yes I have checked the documentation and FAQs.  I have configured NAT on FW-1, the Pix, and Netscreen so I understand how NAT works.  I have tried using DNAT, SNAT, and masquerading and nothing works.  I have my packet filter rules on any, any any allow so this isn't the issue (this is in a test environment- no external connections.)  I have two interfaces eth0=172.16.0.10/24 and eth1=10.196.8.3/21.  I have a computer (172.16.0.201 and 10.196.10.31) on each side with the gateway on each computer pointed at the appropriate firewall interface.  With the any rule on both computers can ping each other successfully as expected. Then I tried adding a SNAT rule 10.196.10.31 (src)->172.16.0.31 (src) and any/no change on the services. When I sniffed the icmp traffic the 10.196.10.31 computer stilled had this IP after traversing the firewall.  When I tried a DNAT (172.16.0.31 (dst)->10.196.10.31 (dst) ) I had the same result- the sniffer showed no change of IP and the 172.16.0.31 ip wasn't pingable from 172.16.0.201. Its like the NAT rules just won't take. The setup seems very straightforward- but there must be something obvious I'm overlooking. When using Checkpoint we had to enter proxy arps and static routes for each translation but I didn't see anything in the documentation about this for Astaro.  I've including the NAT log below:
Chain PREROUTING (policy ACCEPT 2788 packets, 232K bytes)
 pkts bytes target     prot opt in     out     source               destination         
 1696  143K SPOOF_DROP  all  --  *      *       0.0.0.0/0            0.0.0.0/0          
 1696  143K AUTO_NAT_PRE  all  --  *      *       0.0.0.0/0            0.0.0.0/0          

Chain POSTROUTING (policy ACCEPT 2912 packets, 235K bytes)
 pkts bytes target     prot opt in     out     source               destination         
 1717  143K AUTO_NAT_POST  all  --  *      *       0.0.0.0/0            0.0.0.0/0          

Chain OUTPUT (policy ACCEPT 333 packets, 21351 bytes)
 pkts bytes target     prot opt in     out     source               destination         
   65  4427 AUTO_NAT_OUT  all  --  *      *       0.0.0.0/0            0.0.0.0/0          

Chain AUTO_NAT_OUT (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 DNAT       all  --  *      *       0.0.0.0/0            172.16.0.31        to:10.196.10.31 

Chain AUTO_NAT_POST (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 SNAT       all  --  *      *       10.196.10.31         0.0.0.0/0          to:172.16.0.31 

Chain AUTO_NAT_PRE (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 DNAT       all  --  *      *       0.0.0.0/0            172.16.0.31        to:10.196.10.31 

Chain LOGDROP (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 LOG        tcp  --  *      *       0.0.0.0/0            0.0.0.0/0          
    0     0 LOG        udp  --  *      *       0.0.0.0/0            0.0.0.0/0          
    0     0 LOG        esp  --  *      *       0.0.0.0/0            0.0.0.0/0          
    0     0 LOG        ah   --  *      *       0.0.0.0/0            0.0.0.0/0          
    0     0 LOG        icmp --  *      *       0.0.0.0/0            0.0.0.0/0          
    0     0 LOG        all  -f  *      *       0.0.0.0/0            0.0.0.0/0          
    0     0 DROP       all  --  *      *       0.0.0.0/0            0.0.0.0/0          

Chain SPOOF_DROP (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 LOG        all  --  eth1   *       10.196.8.3           0.0.0.0/0          
    0     0 DROP       all  --  eth1   *       10.196.8.3           0.0.0.0/0          
    0     0 LOG        all  --  eth1   *       172.16.0.0/24        0.0.0.0/0          
    0     0 DROP       all  --  eth1   *       172.16.0.0/24        0.0.0.0/0          
    0     0 LOG        all  --  eth0   *       172.16.0.10          0.0.0.0/0          
    0     0 DROP       all  --  eth0   *       172.16.0.10          0.0.0.0/0          
    0     0 LOG        all  --  eth0   *       10.196.8.0/21        0.0.0.0/0          
    0     0 DROP       all  --  eth0   *       10.196.8.0/21        0.0.0.0/0


This thread was automatically locked due to age.
Parents
  • Originally posted by skippy:
    I am new to Astaro and everything else seems to work okay except the NAT. Yes I have checked the documentation and FAQs.  I have configured NAT on FW-1, the Pix, and Netscreen so I understand how NAT works.  I have tried using DNAT, SNAT, and masquerading and nothing works.  I have my packet filter rules on any, any any allow so this isn't the issue (this is in a test environment- no external connections.)  I have two interfaces eth0=172.16.0.10/24 and eth1=10.196.8.3/21.  I have a computer (172.16.0.201 and 10.196.10.31) on each side with the gateway on each computer pointed at the appropriate firewall interface.  With the any rule on both computers can ping each other successfully as expected. Then I tried adding a SNAT rule 10.196.10.31 (src)->172.16.0.31 (src) and any/no change on the services. When I sniffed the icmp traffic the 10.196.10.31 computer stilled had this IP after traversing the firewall.  When I tried a DNAT (172.16.0.31 (dst)->10.196.10.31 (dst) ) I had the same result- the sniffer showed no change of IP and the 172.16.0.31 ip wasn't pingable from 172.16.0.201. Its like the NAT rules just won't take. The setup seems very straightforward- but there must be something obvious I'm overlooking. When using Checkpoint we had to enter proxy arps and static routes for each translation but I didn't see anything in the documentation about this for Astaro.  I've including the NAT log below:
    An update: I rebooted the firewall and the NATing kicked in. I can see in the sniffer that the packets are now being translated.  Do you normally have to reboot for NAT additions to activate?  However the 172.16.0.201 machine still can't ping the DNAT address 172.16.0.31 of the 10.196.10.31 machine.  Using the sniffer I can see that the 172.x computer keeps arping for 172.16.0.31 but the firewall never replies.  Is there any trick to getting the proxy arp to work besides clicking the checkbox on the interfaces?
Reply Children