1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

double NAT - LAN to LAN - question

Discussion in 'Tomato Firmware' started by rs232, Dec 19, 2012.

  1. rs232

    rs232 Network Guru Member

    Hi all, can you please help me validating this concept below?
    Any input would be greatly appreciated!

    Scenario:
    I have two servers located remotely and connected via tomato's openvpn.
    Occasionally for maintenance I need to move Server2 from Site2 to Site1. So basically I have both servers on Site1.
    When I do so I always have to change all the IP addresses (it's an ESXi and have few VMs running with it) to restore at least internet connectivity, but this is not straight forward as I don't use DHCP for the VMs, and in any case I have e.g. few rsync replication scripts referring to specific IP addresses so no easy to manage.

    So I was wondering let's say
    Site1 LAN: 192.168.1.0/24 - Server1: 192.168.1.15
    Site2 LAN 192.168.2.0/24 - Server2: 192.168.2.15

    Could I add on tomato in Site1 a br2 interface with ip 192.168.2.1 and run an IPTABLES script to SNAT+DNAT everything going between br0 to br2? Assuming I stop the VPN
    to remove the routes to 192.168.2.0/24 otherwise pointing to tunnel interface.

    The idea is to have the two servers maintaining both internet connectivity and end-to-end IP connectivity between each other within the same physical LAN without changing any IP on the devices.

    Do you see any problem with this scenario?

    Thanks!
    rs232
     
  2. rs232

    rs232 Network Guru Member

    Actually, NAT might not even be needed...
    Supposed br0 routes to br2 I would just need to set up vlan tagging to have Server2 into br2 using the same HW and remove the route to the tunnel.
    Am I going the right way?
     

Share This Page