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

Open vpn and static routing

Scheduled Pinned Locked Moved OpenVPN
5 Posts 2 Posters 2.3k 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.
  • C
    commandoathens
    last edited by May 15, 2016, 6:24 PM

    Hi as we all know PPTP is now deprecated in Pfsense
    I use open vpn to connect with my iphone now.
    The openvpn client network is 192.168.5.0/24
    the pfsense router  is 10.10.10.55/26
    there is a mikrotik router 10.10.10.1/26 that routes to 10.0.0.0/8 and a static route 10.0.0.0/8 at pfsense to 10.10.10.1
    When I connected to pptp I was able to reach networks over the mikrotik route but with openvpn I can only ping 10.10.10.55/26 network.
    Any idea which field I am missing that needs to be configured?The openvpn logs on iphone show 192.168.5.1 as default gateway but I think that pfsense 10.10.10.55 should be the default gateway but how can I change that.
    Any help will be appreciated.

    1 Reply Last reply Reply Quote 0
    • V
      viragomann
      last edited by May 16, 2016, 6:13 PM

      No, the OpenVPN server has to be the default gateway if you route any traffic over VPN. So 192.168.5.1 is okay.

      It seems like responses from microtik and networks behind it aren’t routed back to pfSense. So you'll have to add a static route to the microtik router to direct the VPN subnet 192.168.5.0/24 to pfSense.

      1 Reply Last reply Reply Quote 0
      • C
        commandoathens
        last edited by May 22, 2016, 12:10 PM

        Thanks a lot my friend yes that is an answer I managed to get to the mikrotik but actually the solution is to masquarade all the openvpn subnet to have the ip of pfsense because mikrotik is routing a 10.0 ip range
        Can you tell me how to mask the openvpn addresses to have the pfsense or another ip in the lan range?
        I tried the outbound NAT but cant seem to make it work.Maybe I am missing something.

        1 Reply Last reply Reply Quote 0
        • V
          viragomann
          last edited by May 22, 2016, 1:25 PM

          Yes, the outbound NAT does the masquerading in pfSense. It also can be resolved that way.
          You have to switch your outbound NAT rule generation mode to "hyprid" (or manual if you like), then add an outbound NAT rule like:
          Interface: <this one="" which="" is="" in="" common="" subnet="" with="" the="" microtik.="" i="" assume="" it's="" lan="">Source: 192.168.5.0/24 (your vpn tunnel)
          Destination: <the networks="" behind="" the="" microtik.="" you="" can="" also="" use="" any="" here,="" if="" don't="" care="">Translation: Interface address
          Any other options can be left at their defaults.</the></this>

          1 Reply Last reply Reply Quote 0
          • C
            commandoathens
            last edited by May 25, 2016, 8:02 PM

            Thanks Viragomann I appreciate it this concludes my 2 week search for the masquarade or outbound NAT as u call it in pfsense.
            When I did that and logged to mikrotik from my iphone the ip was that of pfsense therefore I can see all 10.0 networks on the miktrotik.
            Thanks again I hope I can help others who experience issues in this transition from PPTP to Openvpn.I had no idea that the interface address meant the pfsense IP so I was putting my ip as a /32 subnet and didnt work.Also I used source nat openvpn interface instead of LAN so it was 2 mistakes I did.
            Now all that remains is to fix the 2 broken packages that remain on the menus after the upgrade and make me nuts!!!!nut and BandwidthD that return 404 error.
            Yes I know I should have uninstalled them before the upgrade but who reads the fine print right?Especially in Greece!

            openvpnNAT.PNG
            openvpnNAT.PNG_thumb

            1 Reply Last reply Reply Quote 0
            5 out of 5
            • First post
              5/5
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
              This community forum collects and processes your personal information.
              consent.not_received