Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Add some more routes to OpenVPN exported profiles for Mac and Win

    Scheduled Pinned Locked Moved OpenVPN
    4 Posts 3 Posters 2.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      p0ddie
      last edited by

      Hi there,

      please excuse my total lack of knowledge for OpenVPN, I just started playing with it.

      I have a pfsense 2.0.2 firewall with 3 subnets and one openVPN subnet:

      LAN: 172.16.1.0/24
      Opt1: 192.168.190.0/24
      Opt2: 10.0.0.1/24
      VPN Network: 10.13.37.0/24

      What I would like is to include some additional OpenVPN parameters into the export wizard field so I can reach all these 4 subnets via VPN (thus adding routes to every subnet).

      I would like this to work for the exported viscosity bundle as well as the windows OpenVPN installers.

      When I click "route all traffic through this VPN" in Viscosity I can reach all networks, but I don't want all traffic through vpn, just routes for these networks.

      I played round with Viscosity and got this from the config:
      route 192.168.190.0 24 vpn_gateway default
      route 172.16.1.0 24 vpn_gateway default
      route 10.0.0.0 24 vpn_gateway default

      Does not work for the windows client.

      I googled some and adapted my settings for the Windows OpenVPN client:

      route add 172.16.1.0 mask 255.255.255.0 10.13.37.1 metric 1 -p
      route add 192.168.190.0 mask 255.255.255.0 10.13.37.1 metric 1 -p
      route add 10.0.0.0 mask 255.255.255.0 10.13.37.1 metric 1 -p

      This does not work on the Mac (also doesn't work on Windows).

      Could you please advise me on how to add these routes to the Additional configuration options? Thank you!

      1 Reply Last reply Reply Quote 0
      • H
        heper
        last edited by

        example:

        push "route 192.168.0.0 255.255.255.0" ;
        
        1 Reply Last reply Reply Quote 0
        • jimpJ
          jimp Rebel Alliance Developer Netgate
          last edited by

          You're overcomplicating things quite a bit.

          You can push from the server config as heper mentioned, or in the client config:

          route x.x.x.x y.y.y.y
          

          Where x.x.x.x is the IP/subnet, and y.y.y.y is the subnet mask.

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply Reply Quote 0
          • P
            p0ddie
            last edited by

            Thank you so much! :)

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.