Cannot connect to internal network available on 2nd NIC

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • etutt
    Junior Member
    • Dec 2024
    • 2

    Cannot connect to internal network available on 2nd NIC

    I have an OpenVPN server that has 2 NICs. One NIC is configured with the primary public IP and the other NIC is configured with a private IP that is part of our internal network.

    I would like OpenVPN to provide access to clients to be able to connect to the internal network on the 2nd NIC. I thought it would happen automatically and I also tried to add "push" routes.

    Pretend we have public IP of 123.123.123.123 on the server, OpenVPN is setup using 10.8.0.0/24, and 2nd NIC configured with private network IP of 10.123.0.2 and able to talk to 10.123.0.0/16

    What do I need to add to my configuration to allow access?

    Currently, if I connect as a client to the VPN, I can actually ping the 2nd NIC's assigned IP of 10.123.0.2 but cannot ping any other hosts in 10.123.0.0/16. We do have a router at 10.123.0.1 that can be used as a gateway to other private networks as well and hope to be able to connect to all of them. I can ping all of the internal IPs via SSH session with the OpenVPN server host, just not when connected as an OpenVPN client.

    Any advice on how to set this up properly?
  • etutt
    Junior Member
    • Dec 2024
    • 2

    #2
    I have tried various things:

    route 10.123.0.0 255.255.0.0
    push "route 10.123.0.0 255.255.0.0"

    for example - none of it works. The OpenVPN client cannot ping other addresses in 10.123.xxx other than the secondary NIC's IP as binded (10.123.0.2) even though I can ping everything in 10.123.xxx from an ssh session on the OpenVPN server node itself. You would think if I can reach it from the node, the client should be able to without much extra work either. I must be missing one little thing that would pull this all together..

    Comment

    • CocodaMonkey
      Junior Member
      • Nov 2024
      • 3

      #3
      As far as OpenVPN goes you're doing it right. You need to push the route. Your problem is you need the computers on your internal network to also have that route. Either you go to your router and add the route so all devices on your network have it or you go to each individual device and add a static route.

      You can't make it work solely with OpenVPN, you have to also make changes to your internal network so it knows it can route 10.123.0.0/16 address over 123.123.123.123. If you're having trouble figuring out what your routing table should look like just look at the routing table on the computer you have OpenVPN on. That one is already correct.

      Comment

      • RemoteOne
        Junior Member
        • Dec 2024
        • 6

        #4
        Verify that you have IP Forwarding enabled on the OpenVPN server - without it the server can't route packets between the two NICs. This FAQ for Access Server gives an example for IPv4. If you also use IPv6 do a search on the internet for how to enable it for that too. https://openvpn.net/as-docs/faq-ip-f...rding-enabled-

        Comment

        Working...
        😀
        😂
        🥰
        😘
        🤢
        😎
        😞
        😡
        👍
        👎