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

    OpenVPN Server and Client Simultaneously

    Scheduled Pinned Locked Moved OpenVPN
    16 Posts 2 Posters 2.7k 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.
    • R
      rnatalli
      last edited by

      @Derelict:

      When you say "any" for the outgoing NAT, do you mean my last line where the OpenVPN interface is?  If so, should that only include my OpenVPN tunnel network or that along with my LAN network?  Just don't want to break my OpenVPN client in addition to the server, lol.

      Yes.

      So do I include just my tunnel network or also my LAN network too?  Thanks for the help.

      1 Reply Last reply Reply Quote 0
      • DerelictD
        Derelict LAYER 8 Netgate
        last edited by

        Every source network that you want to be outbound NAT on the way out that interface must match an outbound NAT rule. Source any catches other things like traffic from the interface address itself and generally breaks things.

        Chattanooga, Tennessee, USA
        A comprehensive network diagram is worth 10,000 words and 15 conference calls.
        DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
        Do Not Chat For Help! NO_WAN_EGRESS(TM)

        1 Reply Last reply Reply Quote 0
        • R
          rnatalli
          last edited by

          @Derelict:

          Every source network that you want to be outbound NAT on the way out that interface must match an outbound NAT rule. Source any catches other things like traffic from the interface address itself and generally breaks things.

          Still no go.  Even before I try connecting remotely, my internet goes dead (everything going out my VPN pipe) as soon as I turn on the OpenVPN server.  As soon as my I delete or turn off the server, everything comes back online almost immediately.  I'm running TCP/443 on my OpenVPN client and using the default UCP/1194 on the server.  Any other ideas?

          1 Reply Last reply Reply Quote 0
          • DerelictD
            Derelict LAYER 8 Netgate
            last edited by

            That makes zero sense. Post your client and server configs.

            That rule on the OpenVPN tab is bad news when you have OpenVPN configured as a WAN port.

            You should assign an interface to the OpenVPN server, place the pass any any rule on that, and have no rules on the OpenVPN tab and no rules on the interface assigned to the OpenVPN client. What you have will passs any connection that comes inbound from the OpenVPN service.

            Chattanooga, Tennessee, USA
            A comprehensive network diagram is worth 10,000 words and 15 conference calls.
            DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
            Do Not Chat For Help! NO_WAN_EGRESS(TM)

            1 Reply Last reply Reply Quote 0
            • DerelictD
              Derelict LAYER 8 Netgate
              last edited by

              Why is your port 1194 apparently port forwarded inbound to 192.168.2.104. At least that's what the WAN rule looks like.

              Chattanooga, Tennessee, USA
              A comprehensive network diagram is worth 10,000 words and 15 conference calls.
              DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
              Do Not Chat For Help! NO_WAN_EGRESS(TM)

              1 Reply Last reply Reply Quote 0
              • R
                rnatalli
                last edited by

                @Derelict:

                Why is your port 1194 apparently port forwarded inbound to 192.168.2.104. At least that's what the WAN rule looks like.

                That was my original OpenVPN server on my NAS.  I've disabled the server on the NAS and firewall rule in pfSense.

                1 Reply Last reply Reply Quote 0
                • R
                  rnatalli
                  last edited by

                  @Derelict:

                  That makes zero sense. Post your client and server configs.

                  That rule on the OpenVPN tab is bad news when you have OpenVPN configured as a WAN port.

                  You should assign an interface to the OpenVPN server, place the pass any any rule on that, and have no rules on the OpenVPN tab and no rules on the interface assigned to the OpenVPN client. What you have will passs any connection that comes inbound from the OpenVPN service.

                  Figures, the wizard placed that rule in the OpenVPN tab.  I removed it, assigned the server an interface, and added a pass any rule on the interface.  Still nothing.  What I can't understand is why everything going through my OpenVPN client goes dead the second I activate the server.  Just doesn't make sense.

                  1 Reply Last reply Reply Quote 0
                  • DerelictD
                    Derelict LAYER 8 Netgate
                    last edited by

                    Yeah I could build what you are trying to do in 5 minutes. Finding out what you've done wrong from afar is taking longer.

                    The OpenVPN server and client processes are completely independent from each other. Unless you have some same-subnet things in the configs or something.

                    Chattanooga, Tennessee, USA
                    A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                    DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                    Do Not Chat For Help! NO_WAN_EGRESS(TM)

                    1 Reply Last reply Reply Quote 0
                    • R
                      rnatalli
                      last edited by

                      @Derelict:

                      Yeah I could build what you are trying to do in 5 minutes. Finding out what you've done wrong from afar is taking longer.

                      The OpenVPN server and client processes are completely independent from each other. Unless you have some same-subnet things in the configs or something.

                      Thanks for trying to help.  I'll keep messing with it and hopefully get it worked out.

                      1 Reply Last reply Reply Quote 0
                      • DerelictD
                        Derelict LAYER 8 Netgate
                        last edited by

                        If enabling the server has any effect on existing traffic, it sounds like you have chosen a subnet for the tunnel network that conflicts with something.

                        Usually that means the server won't install the route because it already exists. Maybe you did something different.

                        What did you use for the tunnel network?

                        Chattanooga, Tennessee, USA
                        A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                        DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                        Do Not Chat For Help! NO_WAN_EGRESS(TM)

                        1 Reply Last reply Reply Quote 0
                        • R
                          rnatalli
                          last edited by

                          @Derelict:

                          If enabling the server has any effect on existing traffic, it sounds like you have chosen a subnet for the tunnel network that conflicts with something.

                          Usually that means the server won't install the route because it already exists. Maybe you did something different.

                          What did you use for the tunnel network?

                          I used 192.168.3.0/24 for my tunnel network.  It's all working now after setting up the interface and adjusting NAT rules.  Thanks for that.  Now I just need to figure out if it's possible to use a different route when I'm on my home WiFi network.  I can't use the OpenVPN setting that says "Cellular Only" as I'm using redirect-gateway and that doesn't allow the iPhone to switch back to WiFi when it's available.

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