BalanceNG supports SNAT (Source-NAT) as implemented in the SLB module for IPv4 and IPv6. SNAT proxy mode is enabled with the configuration command “server N proxy enable”.
Proxy SNAT state replication from the VRRP master to the VRRP backup is handled automatically.
The following configuration file example shows the application of the “server N proxy enable” directive (requires no target server configuration and network changes).
// configuration taken ... // BalanceNG ... modules vrrp,arp,ping,hc,master,slb interface 1 { name eth0 } register interface 1 enable interface 1 vrrp { vrid 33 priority 200 network 1 } network 1 { addr 172.17.2.0 mask 255.255.255.0 real 172.17.2.55 virt 172.17.2.56 interface 1 } register network 1 enable network 1 server 1 { ipaddr 172.17.2.58 port 80 protocol tcp proxy enable targets 1,2 } register server 1 enable server 1 target 1 { ipaddr 172.17.2.30 port 80 protocol tcp tcpopen 80,3,10 } target 2 { ipaddr 172.17.2.31 port 80 protocol tcp tcpopen 80,3,10 } register targets 1,2 enable targets 1,2 // end of configuration