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

Snat vs masquerating

what's the difference between


This thread was automatically locked due to age.
Parents
  • Good question!  I hope someone from Astaro will tell us how masquerading is done any differently in the Astaro than the following:

    Network definition: Internet = 0.0.0.0/0 bound to interface 'External'
    SNAT: 'Internal (Network) -> Any -> Internet' change source to 'External (Address)'.

    Cheers - Bob
  • Yes there is a difference. While your posted SNAT rule only translates the IP address, with Masquerading, IPs and Ports are _dynamically_ chosen at the Gateway to allow several connections from the same source port from different computers at once.

    Also, with SNAT, the Gateway has no clue where to send server responses to because the original client IP is not stored in the NAT table.

    Think of SNAT/DNAT/FNAT as a static translation.
  • Thanks, Mario, for the explanation of how Astaro does masquerading.  I'm confused about S/DNAT being static; if that's the case, then how can hundreds of public clients connect to an internal webserver via a DNAT from a public IP on an external Astaro interface?

    Cheers - Bob
  • Thanks, Mario, for the explanation of how Astaro does masquerading.  I'm confused about S/DNAT being static; if that's the case, then how can hundreds of public clients connect to an internal webserver via a DNAT from a public IP on an external Astaro interface?


    Hi Bob,

    Imagine clients A, B, and C connect to Web Server W.
    W is actually the firewall address.
    S is a DNAT'd web server behind the firewall.

    DNAT doesn't change the source address for A,B,C; it only changes the destination address. The server S still sees the source addresses for A, B, C, and the original client port #s.

    If the server needs to make outgoing connections, then SNAT should work for a single server, or MASQ for a server or network.

    Barry
Reply
  • Thanks, Mario, for the explanation of how Astaro does masquerading.  I'm confused about S/DNAT being static; if that's the case, then how can hundreds of public clients connect to an internal webserver via a DNAT from a public IP on an external Astaro interface?


    Hi Bob,

    Imagine clients A, B, and C connect to Web Server W.
    W is actually the firewall address.
    S is a DNAT'd web server behind the firewall.

    DNAT doesn't change the source address for A,B,C; it only changes the destination address. The server S still sees the source addresses for A, B, C, and the original client port #s.

    If the server needs to make outgoing connections, then SNAT should work for a single server, or MASQ for a server or network.

    Barry
Children