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

iPhone VPN into pfsense and not able to route to Internet

NAT
2
7
573
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.
  • S
    sdugoten
    last edited by sdugoten Mar 30, 2023, 11:50 PM Mar 30, 2023, 11:40 PM

    I have setup IPSEC/L2tp server correctly on pfsense. iPhone is able to connect to the Pfsense box successfully and assigned to an IP 10.0.2.129.

    My LAN is 10.0.1.0/24

    iphone is able to ping any IP in 10.0.1.0/24 no problem. And iphone is able to access web server within 10.0.1.0/24 as well, so TCP and ICMP are both working in LAN.

    I have WAN interface, an OpenVPN interface that connect to VPN provider A, and Wireguard interface that connect to VPN provider B. So, there are a total of 3 outgoing interfaces. And finally one LAN interface.

    🔒 Log in to view

    The problem is, the iPhone can't route to internet via WAN interface. I can't route to the Wireguard interface too. However, I can successfully route to the OpenVPN interface and access Internet if I change the outbound NAT and point to openvpn interface. Why the WAN interface is not routable?

    Firewall log also indicated I can NAT correctly

    🔒 Log in to view

    I did the outbound NAT as well
    🔒 Log in to view

    I also make sure this is 0.0.0.0/0 on phase 2 ipsec server as well.

    🔒 Log in to view

    S 1 Reply Last reply Mar 30, 2023, 11:51 PM Reply Quote 0
    • S
      sdugoten @sdugoten
      last edited by Mar 30, 2023, 11:51 PM

      Anyone can tell me where the problem is? The strangest part is that, if I change the outbound NAT point 10.0.2.0/24 to openvpn interface, iPhone then is able to access the Internet via openvpn public IP. However, change the outbound NAT point 10.0.2.0/24 back to WAN interface or wireguard interface, no internet access.

      I suspect it might do with NAT rules because one out of three outgoing interface can access Internet....... Or rules in firewall? I really out of ideas...

      V 1 Reply Last reply Mar 31, 2023, 10:43 AM Reply Quote 0
      • V
        viragomann @sdugoten
        last edited by Mar 31, 2023, 10:43 AM

        @sdugoten
        The traffic might obey the pfSense routing table. I guess, the OpenVPN is the default route on your pfSense.
        So if you want to direct the VPN traffic to another gateway you need to policy route it.

        S 1 Reply Last reply Mar 31, 2023, 10:49 AM Reply Quote 0
        • S
          sdugoten @viragomann
          last edited by Mar 31, 2023, 10:49 AM

          @viragomann said in iPhone VPN into pfsense and not able to route to Internet:

          @sdugoten
          The traffic might obey the pfSense routing table. I guess, the OpenVPN is the default route on your pfSense.
          So if you want to direct the VPN traffic to another gateway you need to policy route it.

          I wonder where to see the default route? And if I can change the default route back to WAN instead of making policy routing? thanks.

          V 1 Reply Last reply Mar 31, 2023, 11:02 AM Reply Quote 0
          • V
            viragomann @sdugoten
            last edited by Mar 31, 2023, 11:02 AM

            @sdugoten said in iPhone VPN into pfsense and not able to route to Internet:

            I wonder where to see the default route?

            You can verify the routes in Diagnostic > Routes.

            And if I can change the default route back to WAN instead of making policy routing?

            Or course you can do this in System > Routing > Gateways > Default Gateway, but this affects the whole upstream traffic from pfSense, which is not policy routed.

            S 1 Reply Last reply Mar 31, 2023, 11:22 AM Reply Quote 0
            • S
              sdugoten @viragomann
              last edited by Mar 31, 2023, 11:22 AM

              @viragomann said in iPhone VPN into pfsense and not able to route to Internet:

              @sdugoten said in iPhone VPN into pfsense and not able to route to Internet:

              I wonder where to see the default route?

              You can verify the routes in Diagnostic > Routes.

              And if I can change the default route back to WAN instead of making policy routing?

              Or course you can do this in System > Routing > Gateways > Default Gateway, but this affects the whole upstream traffic from pfSense, which is not policy routed.

              🔒 Log in to view

              Ok..indeed 0.0.0.0 points to the Openvpn gateway...I wonder where can I change this if I want 0.0.0.0 point to the WAN ip instead? And then I will just do policy routing if I really want to route thru the Openvpn or Wireguard VPN.

              V 1 Reply Last reply Mar 31, 2023, 11:28 AM Reply Quote 0
              • V
                viragomann @sdugoten
                last edited by Mar 31, 2023, 11:28 AM

                @sdugoten
                I assume, that's an OpenVPN client.
                So go to its settings and set a check at "Don't pull routes".

                Most VPN providers push the default route to the clients.

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