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

Routing the same subnet accross vpn

ASG220 connected to branch office ASG120 via site2site vpn both on 7.511. Issue: mobile video security system installed on motor coaches wirelessly uploads to central server at ASG220 site (Site1). The coaches could be at either site on any day so full subnet needed at both sites. Site 1 was working thus: ASG220 interface at 192.168.8.2, wireless ap at 192.168.8.1, server at 192.168.8.10, demo coach at 192.168.8.12. All works as expected. Vendor says no problem to create same subnet at Site2 and connect via vpn. So at site2 ASG120, create interface at 192.168.8.3 and AP at 192.168.8.31 and add subnet to vpn. The vpn comes up and I can ping the interfaces, but of course I can no longer ping the server or ap at site 1. Can this be remedied with some static routing commands? I hope I have made this clear enough. I need data to flow from site2 to the server at site1. I need all of the PC's at site1 on other subnets to view data stored on the server.


This thread was automatically locked due to age.
  • Not an easy fix -- the "correct" way to fix this is to have different subnets at each site -- this is not an Astaro issue, rather, it is a basic IP routing issue.  However, I recall some have rigged up a solution where they SNAT the IPs on one side to another subnet of IPs, then route them via the VPN.
  • Yep, I realize different subnets makes technical sense, but I have these mobile static ip addresses running up and down the highway that need to access the home server from any facility. So in the SNAT scenario are you suggesting that at site2 I give the interface a different subnet address, say 192.168.9.1, and then use SNAT to route the .8.x access point traffic over the vpn? or am I missing the point?
  • Found this suggestion by Olm in a post by Bob Alfson that explains the DNAT/SNAT. I am not clear about the ASG interface addresses. My current security network uses an interface on the ASG220 as its gateway (192.168.8.2) so pc's from other subnets can access the stored video. So, in Olm's scenario, would I change the interface ip to some neutral address?
    Posted by Olm 2009
    SO you want to build a VPN tunnel between the two 192.168.1.0/24 networks because KS02 and GS02 have to talk to each other? 

    Even if the tunnel came up (can be it would come up, have never tested), of course no routing could happen between the networks.

    So here´s the trick for the 100%-proofed-in-many-productive-scenarios-solution:

    The "real" network on both sides is 192.168.1.0/24
    Assume 10.1.1.0/24 and 10.2.2.0/24 are two networks which do not exist on any of the two sides. I will call them the "virtual" networks. Net 10.1.1.0 will be assigned to locA, net 10.2.2.0 to locB
    The VPN tunnel definitions ("local" and "remote" networks) on both sides have to contain ONLY these two virtual networks - no 192.168.1-Network may be contained on both sides! This will lead to the vpn tunnel comes up without any problems.

    Now also the routing is just clear: if someone from location1 (the "client") wants to initiate a connection to location2 (a "server"), there must be
    1) an SNAT rule in locA
    2) a DNAT rule in locB


    Example:
    Client 192.168.1.2 in locA (GS02) wants to make a connection to server 192.168.1.2 in locB (KS02)
    1) locA- SNAT rule: src:192.168.1.2 dst:10.2.2.0/24 new src: 10.1.1.2 (for example)
    2) locB-DNAT-rule: src: 10.1.1.2 dst:10.2.2.2 new dst:192.168.1.2

    So, the "client" in locA has to contact the "server" with the "virtual-server-ip" 10.2.2.2. The packet goes from client to ASG-A, which will SNAT the clients IP (192.168.1.2) to the "virtual-client-ip" 10.1.1.2 and - as this packet matches now the tunnel definition - send it via the VPN to the remote side. The gateway there (asgB) will DNAT the packet to the real servers ip 192.168.1.2 on the location B side
    The reverse packet will be natted vice versa.

    If there are also connections which are initiated from locB to locA (i.e. from KS02 to GS02), you additionaly have to do the same but the SNAT must be on ASG in locB and the DNAT on ASG in locA
  • Just an update: I created "fake" subnets as additional ip addresses on the 192.168.8.x interfaces at eitehr side of the vpn tunnel. .30.x at the ASG120 and .10.x at the ASG220. Then I created the SNAT and DNAT rules as described above on both devices. I attached an old notebook to the .8 subnet at the remote location. Nothing happened at first, but when I restarted the ASG's I could ping from the video server to the notebook and in reverse. So step 1 seems to be working. A ping is one thing, I'll test the applications next week. I tried to Dameware into the notebook with no happy success. I see the NAT packets in the PF Log, but authentication fails. Not sure why yet.
  • If you have 8.2+ on both devices, this is one situation where a RED tunnel between two ASGs can come in handy.  You can effectively "bridge" the two sides so that everything is on the same subnet. No need for a bunch of messy NATs!

    Would that resolve your conundrum?

    Cheers - Bob

    Sorry for any short responses!  Posted from my iPhone.
  • OK, I have been reading the 8.3 documentation and I see the part about configuring an ASG device to act like a RED device. My question is can I limit the RED tunnel to specific interfaces? At my current remote location with the ASG120 there are 2 subnets on eth0 (Internal) and eth2 (security). Those subnets interact with 4 subnets at main office over site2site vpn. I would prefer to have only eth3 (coach video) use the RED tunnel. I plan to upgrade the devices to 8.3 tonight.
  • In essence, you wind up with a new "NIC" on both ASGs.  You can do whatever you want on both sides as long as you coordinate them.  I'm a visual-tactile though, and I didn't try to take your descrption and draw myself a diagram.  If you'd post a diagram including example subnets, IPs, hosts and clients, I could be more specific,

    Cheers - Bob
  • Well here's a quick and dirty diagram of the two ASG's and their respective subnets. Hope it makes sense I don't have a good uptodate network map.
    ASG120toASG220.zip
  • OK, so it looks like you want to bridge the .8. networks.  You need to eliminate those from the VPN that connects the other subnets, and make sure that DHCP is "off" for .8. on the 120 and enabled, if needed anywhere, on the 220.  Once you have the RED tunnel set up, bridge it to the existing .8. interfaces on each ASG.  That should be all you need as long as there are no duplicate IPs.

    Let us know if this RED magic works for you! [;)]

    Cheers - Bob
  • I'm sure this will work eventually Bob, but the directions are very obscure. I upgraded the systems to 8.3. On the HOST system it says to just ADD on the Client MGMT tab, enter a name for the device, select ASG and Save. That's it. I notice that when I go back in to edit properties later there are things to configure like Static IP address. Is the the IP of the remote interface it want to use (8.3)? What Def. GW do I use here? On the remote end the documentation says to "Select the ASG Host" What am I selecting here? The public name and IP? The remote gateway IP, the IP of the interface I want to use? What? I have tried several variations and none work. The RED Live log just says things like Can't Connect, Handler Died on the client, or Unable to fetch red servers object list on the host. Once I get a RED tunnel up, do I bridge the 2 interfaces I want under Interfaces & Routing/Bridging, or is that done by selecting the correct IP addresses in the RED setup?