Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    VPN doesn't allow acess to Lan (or internet), but does connect properly.

    Scheduled Pinned Locked Moved IPsec
    12 Posts 3 Posters 277 Views 2 Watching
    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.
    • U
      Unique
      last edited by

      I'm not very used to forums, so forgive me if I make a foux pas.

      So I have been trying to use a VPN to connect my phone (and later other devices) to my home network, but I have run into an issue. The VPN connects (I have tried both IPsec and OpenVPN), but when connected it doesn't seem like any traffic goes through. I can't ping the remote device, but I can check and see that it is allocated an IP address and is connected. I have check all of the firewall rules for both VPNs and the LAN as well. I have tried to figure out the issue but I can't identify what it could be. My only thoughts are that it could be an issue with the subnetting, but I don't see what the issue would be. The default subnet I use for my LAN devices is 10.27.27.0/24, with 10.27.26.0/24 for IPsec and 10.27.25.0/24 for OpenVPN. I have gone through and check the firewall logs at the time of the connections and it seems fine, but I just can't tell what the issue would be.

      For IPsec I have tried both having the P2 using the Local Subnet as both "LAN Subnet", 10.27.0.0/16, and 10.27.27.0/24. None has worked.

      Firewall rules for both VPNs are set to allow all traffic, with IPsec having both IPv6 and IPv4, and OpenVPN having only IPv4.

      All of this is on PFSense CE, 2.9.0-RELEASE.

      I am working on learning computer networking in a more hands on way, so I tried a lot to fix this, but I just haven't found what the issue could be so I'm posting to see if someone who knows a bit more could give me a hand here or point me in a good direction.

      D 1 Reply Last reply
      Reply Quote 0
      • D
        dmcc @Unique
        last edited by dmcc

        @Unique does your ISP rotate the IP on the modem?

        Because if you have dynamic IP, you need to setup Dynamic DNS and point your VPN endpoint at that domain instead of hardcoding the IP.

        U 1 Reply Last reply
        Reply Quote 0
        • U
          Unique @dmcc
          last edited by

          @dmcc I don't think so, but the issue isn't really the connection. I have always (aside from user error haha) been able to establish a connection, just not able to access the Lan Subnet, including the router (which is the VPN concentrator). I can see in the logs and other places that the remote device is connected and assigned an IP.

          D 1 Reply Last reply
          Reply Quote 0
          • D
            dmcc @Unique
            last edited by

            @Unique are you able to ping the gateway once you've connected to the tunnel?

            U 1 Reply Last reply
            Reply Quote 0
            • U
              Unique @dmcc
              last edited by

              @dmcc

              I have it setup on my phone so I just setup Termux and did a ping on my Wi-Fi where it does work (as a control), and then I went to mobile data + VPN and there is no response on the ping. The VPN connection is successful, and I can see in the Status > IPsec page that my phone has been given an IP.

              The router is 10.27.27.1 and the mobile client (my phone) is 10.27.26.1

              So to answer the question, no.

              Sorry about the delay.

              GertjanG 1 Reply Last reply
              Reply Quote 0
              • GertjanG
                Gertjan @Unique
                last edited by Gertjan

                @Unique said:

                The router is 10.27.27.1 and the mobile client (my phone) is 10.27.26.1

                10.27.27.1 is your pfSense LAN interface.
                You don't need to do anything with the LAN.

                I'll take my pfSense as an example.
                My LAN : 192.168.1.1/24 (I never bothered to change it, it's the default).
                This isn't important.
                I have another 'LAN (OPT1) using 192.168.2.1/24. - 'who cares ?' ^^
                So, this seems logic to me : the OpenVPN server :
                image.jpeg image.jpeg

                Note that I 'force' traffic through the VPN connection (redirect IPv4 Gateway).

                This means that when I connect my phone, using the OpenVPN app, to my pfSense, I see this :

                image.jpeg

                Where "92.184.98.176" is the IPv4 of my phone on the phone network.
                And 192.168.3.20 is the OpenVPN 'client' = my phone - IPv4.

                The OpenVPN server assigned upon connection my phone client tunnel IPv4 192.168.3.20, very much like a dhcp server should do.

                Both server and client must be in the 192.168.3.0/24 network, and they are.

                My OpenVPN firewall rules :

                image.jpeg

                "VPNS Network" is a pfSense alias for the 192.168.3.0/24 network = my OpenVPN tunnel, see image above.

                Note that I don't use the generic "OpenVPN" firewall rule page, it's empty.
                I created a :

                image.jpeg

                where 'opvpns1" is my OpenVPN server.

                My VPN > OpenVPN > Servers settings are pretty default.

                image.jpeg

                means no password/user, just a certificate to identity.

                Btw : only the VPN firewall rule(s) matter.
                Nothing on LAN is needed. LAN firewall rules are only used for incoming (INTO) the LAN NIC.
                Like OpenVPN rules, WAN rules etc.

                My WAN does contain of course this rule :

                image.jpeg

                because incoming VPN traffic (UDP, port 1194) needs to get 'into' pfSense so it can reach the openvpn server process running on pfSense.

                No "help me" PM's please. Use the forum, the community will thank you.

                U 1 Reply Last reply
                Reply Quote 0
                • U
                  Unique @Gertjan
                  last edited by

                  @Gertjan
                  I appreciate the response, but the issue I'm having is specifically the LAN routing. I can establish a tunnel just fine on both IPsec and OpenVPN.

                  I do have an OpenVPN setup similar to yours, just with User Auth.
                  Here are the rules for OpenVPN:
                  image.jpeg

                  And for IPsec:
                  image.jpeg

                  And for the WAN:
                  image.jpeg

                  The issue I am having is not a connection to the concentrator, but rather the fact that once connected it is impossible to communicate with any other device, even the gateway. I have done this successfully before on an older version of PFsense, but I had to reset the device so now I am doing it again and now it doesn't work.

                  GertjanG 1 Reply Last reply
                  Reply Quote 0
                  • GertjanG
                    Gertjan @Unique
                    last edited by

                    @Unique said:

                    Here are the rules for OpenVPN:

                    image.jpeg

                    Yeah, no traffic what so ever reaches the VPN server.

                    Can you show your OpenVPN server settings ?
                    You can find it here : /var/etc/openvp/server1/config.ovpn

                    dev ovpns1
                    verb 1
                    dev-type tun
                    dev-node /dev/tun1
                    writepid /var/run/openvpn_server1.pid
                    #user nobody
                    #group nobody
                    script-security 3
                    daemon
                    keepalive 10 60
                    ping-timer-rem
                    persist-tun
                    persist-key
                    proto udp4
                    auth SHA256
                    up /usr/local/sbin/ovpn-linkup
                    down /usr/local/sbin/ovpn-linkdown
                    client-connect /usr/local/sbin/openvpn.attributes.sh
                    client-disconnect /usr/local/sbin/openvpn.attributes.sh
                    local 192.168.10.4
                    tls-server
                    server 192.168.3.0 255.255.255.0
                    client-config-dir /var/etc/openvpn/server1/csc
                    tls-verify "/usr/local/sbin/ovpn_auth_verify tls 'bhf.tld' 1"
                    lport 1194
                    management /var/etc/openvpn/server1/sock unix
                    max-clients 10
                    push "dhcp-option DOMAIN bhf.tld"
                    push "dhcp-option DNS 192.168.3.1"
                    push "block-outside-dns"
                    push "register-dns"
                    push "dhcp-option NTP 192.168.3.1"
                    push "redirect-gateway def1"
                    client-to-client
                    remote-cert-tls client
                    capath /var/etc/openvpn/server1/ca
                    cert /var/etc/openvpn/server1/cert 
                    key /var/etc/openvpn/server1/key 
                    dh /etc/dh-parameters.2048
                    tls-crypt /var/etc/openvpn/server1/tls-crypt 
                    data-ciphers AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305
                    data-ciphers-fallback AES-256-GCM
                    allow-compression no
                    persist-remote-ip
                    float
                    topology subnet
                    status /var/log/openvpn.status
                    

                    Btw : 192.168.10.4 is my pfSense WAN, the server listens on this IPv4.

                    My client :

                    persist-tun
                    persist-key
                    data-ciphers AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305
                    data-ciphers-fallback AES-256-GCM
                    auth SHA256
                    tls-client
                    client
                    remote a.b.c.d 1194 udp4
                    setenv opt block-outside-dns
                    lport 0
                    verify-x509-name "bhf.tlf" name
                    remote-cert-tls server
                    explicit-exit-notify
                    
                    <ca>
                    -----BEGIN CERTIFICATE-----
                    MIIEejCCA2KgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBhTELMAkGA1UEBhMCRlIx
                    .....
                    31jwp8xl3G6sP5uzEgjDhpXsLJDWxA8+91hNB+SzRJIHO/KoUulIOW0yKDAzBg==
                    -----END CERTIFICATE-----
                    </ca>
                    <cert>
                    -----BEGIN CERTIFICATE-----
                    MIIEujCCA6KgAwIBAgIBIzANBgkqhkiG9w0BAQsFADCBhTELMAkGA1UEBhMCRlIx
                    ....
                    S2AeRwVWmXDT43xhVIU=
                    -----END CERTIFICATE-----
                    </cert>
                    <key>
                    -----BEGIN PRIVATE KEY-----
                    MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCfyL18M0DM1uri
                    ...
                    jquUajfSmZ1fQvoEWfw7UBAx
                    -----END PRIVATE KEY-----
                    </key>
                    <tls-crypt>
                    #
                    # 2048 bit OpenVPN static key
                    #
                    -----BEGIN OpenVPN Static key V1-----
                    893c76e84187bb1e40f987c83db4d256
                    ....
                    8c5a6102dc6ab3275c6fa36d8853b668
                    -----END OpenVPN Static key V1-----
                    </tls-crypt>
                    

                    Everything after "<ca>" are my certificates, as I use only TLS cert based identification, not user names and passwords.

                    You use the OpenVPN Connect iPhone (and Windows PC) app : https://openvpn.net/client/

                    No "help me" PM's please. Use the forum, the community will thank you.

                    U 1 Reply Last reply
                    Reply Quote 0
                    • U
                      Unique @Gertjan
                      last edited by

                      @gertjan

                      I couldn't upload them as text (spam warning), but here are .txt files with the data:
                      server-config.txt
                      phone-config.txt

                      GertjanG 1 Reply Last reply
                      Reply Quote 0
                      • GertjanG
                        Gertjan @Unique
                        last edited by

                        @Unique said:

                        phone-config.txt

                        Can you use another vpn client ? For example the the official one ? (see above)

                        No "help me" PM's please. Use the forum, the community will thank you.

                        U 1 Reply Last reply
                        Reply Quote 0
                        • U
                          Unique @Gertjan
                          last edited by

                          @Gertjan
                          I installed the official one, and it now lets me connect to the pfsense router's GUI, but still nothing else. I tried a connection to a server over http and I pinged another server, nothing.

                          From the firewall:
                          Screenshot_20261110_105741.jpeg

                          U 1 Reply Last reply
                          Reply Quote 0
                          • U
                            Unique @Unique
                            last edited by

                            Actually, I just noticed that unlike previous times, I can send traffic through to the internet. That wasn't working on either VPN before.

                            1 Reply Last reply
                            Reply Quote 0

                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                            With your input, this post could be even better 💗

                            Register Login
                            • First post
                              Last post
                            Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
                            Privacy Policy · Cookie Policy