What's new

Multi Site2Site VPN

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Managed to configure it and it works well between 3 sites, two and a main hub that the two connect to.

In case someone could use it going forward:

I got three sites, which I configured as:
192.168.111.1 - the main one, which acts as the VPN server the clients connect to
192.168.112.1 - Site2
192.168.211.1 - Site3

I attached a screenshot of the configuration of the three sites (from left to right - main, site 2, site 3), along with the VPN profile for the main site which the clients should use to connect to.
Configure your site as I did, and dont forget to:

Using Putty you need to create a config file for each client (Site2, Site3 in this case). To do so,
1. Under /jffs/configs/openvpn/ccd1 (note: assuming you are using VPN Server1, if using Server 2 use ccd2 instead of ccd1. If you don't have that folder(s), create it using mkdir)
2. run "vi Site2" to create the file (note: Site2 must be the same as the username that you used to config as the login - remember you configure that in the VPN Server 1 (or 2) webpage where you enter the user name and password for connection)

In this file you should have:
For site 2:
iroute 192.168.112.0 255.255.255.0 => Notifies the VPN server that this Site2 owns this subnet (if you are using a different one, change it here)
push "route 192.168.221.0 255.255.255.0"=> Notifies the VPN server which the clients connect to, to push this subnet of Site3 to the Site2 (note that the main server 192.168.111.1 is pushed via the VPN server configuration via "push "route 192.168.111.0 255.255.255.0")

For site 3:
iroute 192.168.211.0 255.255.255.0
push "route 192.168.112.0 255.255.255.0"

So if you have more than two sites connecting:
1. Make the appropriate number of config files in /jffs/configs/openvpn/ccd1, one for each site that is connecting to the main hub
2. Add to each file the "push route" command so that each site "knows" about all the other sites (or only some of them, if that's your use case)

So you will have in each config file
iroute (AKA "this is the subnect of the client connecting to me")
push (site 2) "I am letting this client know that site2 exists"
push (site 3)
push (site 4)
and so on...
 

Attachments

  • VPN Multi Site to Site.png
    VPN Multi Site to Site.png
    325.9 KB · Views: 36
  • VPN S2S Main Hub.ovpn.txt
    542 bytes · Views: 33

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top