[SOLVED] OpenVPN tunnel with Synology SRM

Started by BiTRiP, March 23, 2019, 12:28:19 PM

Previous topic - Next topic
March 23, 2019, 12:28:19 PM Last Edit: April 05, 2019, 04:12:11 PM by BiTRiP
Hello,

I'm trying to get a OpenVPN tunnel working with static ip's and routing but I don't get it working properly.

My situation:

OPNsense LAN Network = 192.168.2.0/24
Synology Remote Network = 192.168.10.0/24
Tunnel network = 192.168.6.0/24

I do get a connection working but the Synology SRM is always getting 192.168.6.6 with 6.5 as gateway while the OPNSense has 6.1 and thinks 6.2 is the remote. Obviously the 6.5 does not exist, neither does 6.2.

I just want to have OPNSense as always be 6.1 and the Synology always get 6.2 so I can setup static routing.
Already tried client specific overrides with username as Common Name and adding ifconfig-push 192.168.6.2 192.168.6.1; but it does not help.

What can I do? Had anyone a OpenVPN tunnel working with a Synology SRM and static IP's?

Many thanks in advance.


March 23, 2019, 09:55:49 PM #1 Last Edit: March 23, 2019, 09:57:54 PM by BiTRiP
Meanwhile the Synology SRM gets 192.168.6.2 by enabling Topology option.
This changes it from default net30 to subnet.

Routing between the two is what is left.





March 24, 2019, 03:49:50 PM #2 Last Edit: March 24, 2019, 03:54:25 PM by BiTRiP
      
              Site A                      Site B
      192.168.2.0/24 ⁞                  ⁞ 192.168.10.0/24

       ┌──────────┐  ⁞                  ⁞  ┌──────────┐
       │ OPNsense •-----►( Internet )◄-----• Synology │
       │ (OpenVPN │  ⁞                  ⁞  │ router   │
       │  server) │                        └─•────────┘
       └────────•─┘  ⁞                  ⁞    |  192.168.10.1
   192.168.2.1  |                            | (192.168.6.2)
  (192.168.6.1) |    ⁞                  ⁞    |   
                |                            |
┌────────────┐  |    ⁞                  ⁞    |     
│ Station A1 •--┤                            |
└────────────┘  |    ⁞                  ⁞    | 
                |                            |  ┌────────────┐
┌────────────┐  |    ⁞                  ⁞    ├--• Station B1 │
│ Station A2 •--┤                            |  └────────────┘
└────────────┘  |    ⁞                  ⁞    |
                |                            |  ┌────────────┐
                |    ⁞                  ⁞    ├--• Station B2 │
                |                            |  └────────────┘
                |    ⁞   VPN network    ⁞    |
                ├~~~~~~~~~~~~~~~~~~~~~~~~~~~~┤
                     ⁞  192.168.6.0/24  ⁞   
                                       
                     ⁞                  ⁞



(c) Cduv for this diagram ;)

March 24, 2019, 03:49:58 PM #3 Last Edit: March 24, 2019, 03:55:28 PM by BiTRiP
I can't get routing properly working.
Site B can ping everything behind OPNSense server (192.168.2.0/24) but Site A can't ping anything behind Synology router (192.168.10.0/24).

Site A LAN can ping 192.168.6.2 which is the OpenVPN IP of Synology router.

Even OPNSense router can't ping side B LAN.

Any suggestions? It looks i tried them all 😉


Solved by using an "iroute 192.168.10.0 255.255.255.0" in client specific overrides!