OPNsense Forum

Archive => 19.1 Legacy Series => Topic started by: BiTRiP on March 23, 2019, 12:28:19 PM

Title: [SOLVED] OpenVPN tunnel with Synology SRM
Post by: BiTRiP on March 23, 2019, 12:28:19 PM
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.

Title: Re: OpenVPN tunnel with Synology SRM
Post by: BiTRiP on March 23, 2019, 09:55:49 PM
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.




Title: Re: OpenVPN tunnel with Synology SRM
Post by: BiTRiP on March 24, 2019, 03:49:50 PM
      
              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 ;)
Title: Re: OpenVPN tunnel with Synology SRM
Post by: BiTRiP on March 24, 2019, 03:49:58 PM
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 😉
Title: Re: OpenVPN tunnel with Synology SRM
Post by: BiTRiP on April 05, 2019, 04:11:35 PM

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