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

How to configure NAT?

Hello!

I have: 
1. Astaro Security Gateway with 2 network interfaces: 
 eth0: XX.XX.137.177 / 24 (WAN address) 
 eth1: 10.77.148.1 / 24 (LAN address) 

2. WWW-server with two interfaces: 
 eth0: XX.XX.137.211 / 24 (WAN address) 
 eth1: 10.77.148.211 (LAN address) 

Network interfaces are eth1 on aSG and WWW-server connected to the switch through 148 VLAN. 

I am trying to configure NAT between XX.XX.137.177 (aSG) and 10.77.148.211 (www-server) to www-server to ping the address XX.XX.137.177 and was available on the Internet at http://XX.XX. 137,177 /. 

All protection, firewall - disabled. 

For HTTP: 

Traffic Source: Any 
Traffic Service: HTTP 
Traffic Destination: WAN [XX.XX.137.177] (Address) 
    
NAT mode: DNAT (Destination) 
Destination: 10.77.148.211 
Destination Service: HTTP 
   
To PING: 

Traffic Source: Any 
Traffic Service: ping 
Traffic Destination: WAN [XX.XX.137.177] (Address) 
    
NAT mode: DNAT (Destination) 
Destination: 10.77.148.211 
Destination Service: ping 
  

However, NAT does not work: when you try to ping XX.XX.137.177 - Host Unreachable. 

WWW-server (10.77.148.211) ping well using the utility "Ping" in aSG. 

Please help. 

(This is my first post and I have bad English, sorry [:(] )


This thread was automatically locked due to age.
  • I'm assuming that your web site is working fine and that ping is your only issue.

    Ping allowance is handled in a separate place.  See the screen shot attached.

    BTW,
    For HTTP: 

    Traffic Source: Any 
    Traffic Service: HTTP 
    Traffic Destination: WAN [XX.XX.137.177] (Address) 

    NAT mode: DNAT (Destination) 
    Destination: 10.77.148.211 
    Destination Service: HTTP 


    If you are natting from a service to the same service, you don't need to specify the destination service.  See https://support.astaro.com/support/index.php/How_to_Port_Forward_Service_Ports_with_NAT.
  • Let me ask a question real quick before getting to the meat of the matter.   Why do you have a WAN interface on your www-server?  If the point of putting the www-server behind the firewall is to protect it, then giving it a WAN interface breaks that protection.

    Most of the time for servers, a DNAT rule is the way to go.  You won't need a masquerading rule for a server because it is responding on only a couple of very specific ports, and you want those ports to go to the server and no where else.  In the DNAT rule you ca specify which ports (aka services) you want the DNAT rule to forward.  In that group you will want 80(http), 443(https), and ping to start with.   Depending on what functions you want the www-server to have you may have to add ports later (such as FTP or SSH), but those three will get you started. 

    Hopefully this helps a bit.

    -Bob