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

    Problem tunneling all client traffic through openVPN

    Scheduled Pinned Locked Moved OpenVPN
    12 Posts 3 Posters 18.8k 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
      charlie0440
      last edited by

      I have AON enabled and have this rule:

      Interface Source Source Port Destination Destination Port NAT Address NAT Port Static Port
      WAN2 10.0.8.0/24 * * * * * NO

      I also added one for the WAN incase it was coming through there
      WAN  10.0.8.0/24 * * * * *    NO

      Still no joy

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

        can you tell me what device 10.0.8.5 is ? (you use it as gateway), but it appears that your pfsense is 10.0.8.1

        1 Reply Last reply Reply Quote 0
        • C
          charlie0440
          last edited by

          Thats is a good question, it is what pfsense has defaulted it to, I do not specify 10.0.8.5 anywhere.

          What do you suggest, should i add in the advanced option:
          push "redirect-gateway def1"

          Edit tried adding the above and I get no output under gateway when viewing ipconfig /all

          1 Reply Last reply Reply Quote 0
          • C
            charlie0440
            last edited by

            here are some screen shots which someone can hopefully help with:

            1 Reply Last reply Reply Quote 0
            • W
              wm408
              last edited by

              Here is my configuration for road warrior from the top to bottom in the GUI (if I use xxxx this means its filled but not specified here):

              Server Mode: Remote Access (SSL/TLS + User Auth)
              Backend for auth: Local Database
              protocol: UDP
              device mode: tun
              interface: WAN
              local port: xxxx
              description: xxxx
              TLS Authentication checked with a 2048bit key
              peer certificiate authority: xxxx
              Server Certificate: xxxx
              DH Paramaters Length: 2048 bits
              Encryption Algorithm: xxxx
              Hardware crypto: xxxx
              Certificiate depth: xxxx
              Tunnel Network: 10.0.0.0/24
              Redirect Gateway: checked
              Compression: checked
              Dynamic IP: checked
              Address Pool: Checked
              DNS Default Domain: checked
              DNS Servers: filled
              Advanced: user nobody;group nobody

              –---- Here is the actual config file itself inside /var/etc/openvpn generated by openvpn –-----
              (all of these options are automatically generated based on my options selected in the GUI except
              the user nobody;group nobody advanced options)

              dev ovpns2
              dev-type tun
              dev-node /dev/tun2
              writepid /var/run/openvpn_server2.pid
              #user nobody
              #group nobody
              script-security 3
              daemon
              keepalive 10 60
              ping-timer-rem
              persist-tun
              persist-key
              proto udp
              cipher xxxx
              up /usr/local/sbin/ovpn-linkup
              down /usr/local/sbin/ovpn-linkdown
              local xxxx
              tls-server
              server 10.0.0.0 255.255.255.0
              client-config-dir /var/etc/openvpn-csc
              username-as-common-name
              auth-user-pass-verify /var/etc/openvpn/xxxx.php via-env
              tls-verify /var/etc/openvpn/xxxx.tls-verify.php
              lport xxxx
              management /var/etc/openvpn/xxxx.sock unix
              push "route xxxx 255.255.255.0"
              push "dhcp-option DOMAIN xxxx"
              push "dhcp-option DNS xxxx"
              push "redirect-gateway def1"
              ca /var/etc/openvpn/xxxx.ca
              cert /var/etc/openvpn/xxxx.cert
              key /var/etc/openvpn/xxxx.key
              dh /etc/dh-parameters.2048
              tls-auth /var/etc/openvpn/xxxx.tls-auth 0
              comp-lzo
              persist-remote-ip
              float
              user nobody
              group nobody

              ---------- My NAT Out rule under AON –-----------

              Interf.    Source    s.port    dest.    d.port    NAT addr      Stat.prt        descr.
              WAN    10.0.0.0/24    *          *        *  *      *              NO            Description

              ---------- My firewall rule under the OpenVPN tab under Firewall > Rules –----

              ID  Proto      Source      port    Dest.  Port  Gate  Queue  Sched.  Descrip.
                      *      10.0.0.0/24      *      *        *      *      *

              1 Reply Last reply Reply Quote 0
              • W
                wm408
                last edited by

                I didn't include my external firewall rule, but yours looks fine.

                You can ping internal addresses on the OpenVPN network from the client OK correct?  I had this problem recently when I upgraded to 2.0.1 but it was just a fundamental NAT issue.

                All of your configuration seems fine… ArgH.

                1 Reply Last reply Reply Quote 0
                • C
                  charlie0440
                  last edited by

                  yes i can ping PC's on the LAN. I can't get my head around it!

                  1 Reply Last reply Reply Quote 0
                  • W
                    wm408
                    last edited by

                    When my problem with NAT was going on.. I had the same symptom.

                    No firewall block would show because it wasn't getting blocked.
                    The client could resolve hostnames no problem but couldn't ping back out the gateway.

                    Are you sure all of the subnets in your firewall/NAT rules are correct to the client pool subnet for the warrior vpn?

                    @charlie0440:

                    yes i can ping PC's on the LAN. I can't get my head around it!

                    1 Reply Last reply Reply Quote 0
                    • W
                      wm408
                      last edited by

                      Try leaving concurrent connections blank.
                      Remove your redirect gateway def1 entry in advanced options if its still there, the checkbox in the GUI will suffice.

                      1 Reply Last reply Reply Quote 0
                      • C
                        charlie0440
                        last edited by

                        @wm408:

                        Try leaving concurrent connections blank.
                        Remove your redirect gateway def1 entry in advanced options if its still there, the checkbox in the GUI will suffice.

                        Tried that, didn't fix it.

                        @wm408:

                        Are you sure all of the subnets in your firewall/NAT rules are correct to the client pool subnet for the warrior vpn?

                        No, most of those NAT were made automatically.

                        Come to think of it I will have to play with the WAN gateways, as one day (after setting up failover) some subnets stopped having internet. I had to change from gateway = * to gateway = WAN for them to get online. I will try the same for OpenVPN

                        EDIT - SUCCESS :)

                        I had to change the OpenVPN firewall rules to use the WAN2 gateway:

                        • 10.0.8.0/24 * * * WAN2_312403 none

                        Thanks for all the help!

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