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

    OpenVPN Server not routing local websites

    Scheduled Pinned Locked Moved OpenVPN
    23 Posts 4 Posters 5.9k 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
      rin_tinn
      last edited by

      I was having the same problem. Turned out the firewall was enabled on my Ubuntu server (which I knew, but forgot to punch a hole through).

      If you log into your Ubuntu server and issue the command "sudo ufw status" it will tell you if the firewall service is active or not. If it is active, you'll need to have rules which allow access from the VPN network you set in the "IPv4 Tunnel Network" option (VPN >> OpenVPN >> Server).

      1 Reply Last reply Reply Quote 0
      • L
        lastb0isct
        last edited by

        I checked the firewall status and its turned inactive:

        lastb0isct@miniserver:~$ sudo ufw status
        [sudo] password for lastb0isct:
        Status: inactive
        
        

        Any other ideas?

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

          It is interesting that the port in your screen capture of your firewall rule is 11111 and not 1194. Wonder if that has something to do with it? Pretty new to pfSense myself, so I'm not sure.

          What VPN client are you using to connect with? I was trying to connect with Tunnelblick, but could not get it to work well. After I switched over to Viscosity VPN client, I haven't had any other problems.

          1 Reply Last reply Reply Quote 0
          • M
            marvosa
            last edited by

            Lets get a few things out of the way:

            • Post a network map, so we know how things are connected

            • What is the LAN IP of your PFsense box?

            • Post the routing table of your server.  Is the IP still 192.168.1.62?

            • Post the routing table of your connected client

            • What port is your app listening on (80?, 8080?, 8081?, 8082?)?

            • From the client, does the port responds via telnet?

            • Post a traceroute from the client to the server

            1 Reply Last reply Reply Quote 0
            • L
              lastb0isct
              last edited by

              LAN IP of pfSense Box: 192.168.1.2
              Ports of Server = 8080, 8081, 8082
              It responds via telnet on all of those ports

              Server routing table:

              Proto Recv-Q Send-Q Local Address           Foreign Address         State      
              tcp        0      0 192.168.1.62:8082       192.168.1.62:52465      TIME_WAIT  
              tcp        0      0 192.168.1.62:8082       192.168.1.62:52466      TIME_WAIT  
              tcp        0      0 localhost:58846         localhost:52205         ESTABLISHED
              tcp        0      0 192.168.1.62:887        192.168.1.35:nfs        ESTABLISHED
              tcp        0    236 192.168.1.62:ssh        192.168.10.2:65407      ESTABLISHED
              tcp        0      0 192.168.1.62:tproxy     192.168.10.2:64229      ESTABLISHED
              tcp        0      0 192.168.1.62:52467      192.168.1.62:8082       TIME_WAIT  
              tcp        0      0 192.168.1.62:tproxy     192.168.10.2:64232      ESTABLISHED
              tcp        0      0 192.168.1.62:http-alt   192.168.1.127:2278      ESTABLISHED
              tcp        0      0 192.168.1.62:tproxy     192.168.10.2:64227      ESTABLISHED
              tcp        0      0 192.168.1.62:tproxy     192.168.10.2:64230      ESTABLISHED
              tcp        1      0 192.168.1.62:36767      vps1.v-u.be:http        CLOSE_WAIT 
              tcp        0      0 192.168.1.62:mysql      192.168.1.41:36738      ESTABLISHED
              tcp        0      0 192.168.1.62:tproxy     192.168.10.2:64228      ESTABLISHED
              tcp        0      0 192.168.1.62:8082       192.168.1.62:52464      TIME_WAIT  
              tcp        0      0 localhost:52205         localhost:58846         ESTABLISHED
              tcp        0      0 192.168.1.62:http-alt   192.168.10.2:64268      ESTABLISHED
              tcp        0      0 192.168.1.62:http-alt   192.168.10.2:64266      ESTABLISHED
              tcp        0      0 192.168.1.62:8082       192.168.1.62:52463      TIME_WAIT  
              tcp        0      0 192.168.1.62:mysql      192.168.1.40:34729      ESTABLISHED
              tcp        0      0 192.168.1.62:http-alt   192.168.10.2:64267      ESTABLISHED
              tcp        0      0 192.168.1.62:tproxy     192.168.10.2:64231      ESTABLISHED
              
              

              Client routing table:

              Proto Recv-Q Send-Q  Local Address          Foreign Address        (state)    
              tcp4       0      0  192.168.10.2.65281     64.210.194.87.https    SYN_SENT   
              tcp4       0      0  192.168.10.2.65280     17.110.242.14.https    SYN_SENT   
              tcp4       0      0  192.168.10.2.65279     17.110.242.14.https    SYN_SENT   
              tcp4       0      0  192.168.10.2.65278     lax02s20-in-f24..https SYN_SENT   
              tcp4       0      0  192.168.10.2.65277     216.178.109.197.https  SYN_SENT   
              tcp4       0      0  192.168.10.2.65276     lax02s20-in-f24..https SYN_SENT   
              tcp4       0      0  192.168.10.2.65275     lax17s05-in-f4.1.https SYN_SENT   
              tcp4       0      0  192.168.10.2.65274     lax02s19-in-f8.1.https SYN_SENT   
              tcp4       0      0  192.168.10.2.65273     pa-in-f188.1e100.5228  SYN_SENT   
              tcp4       0      0  192.168.10.2.65272     pc-in-f189.1e100.https SYN_SENT   
              tcp4       0      0  192.168.10.2.65271     pc-in-f189.1e100.https SYN_SENT   
              tcp4       0      0  192.168.10.2.65270     lax02s19-in-f8.1.https SYN_SENT   
              tcp4       0      0  192.168.10.2.65269     lax17s05-in-f4.1.https SYN_SENT   
              tcp4       0      0  192.168.10.2.65268     pa-in-f188.1e100.5228  SYN_SENT   
              tcp4       0      0  192.168.10.2.65267     pc-in-f189.1e100.https SYN_SENT   
              tcp4       0      0  192.168.10.2.65266     pc-in-f189.1e100.https SYN_SENT   
              tcp4       0      0  192.168.0.18.65263     173.112.255.173..https ESTABLISHED
              tcp4       0      0  localhost.menandmice-d localhost.65262        ESTABLISHED
              tcp4       0      0  localhost.65262        localhost.menandmice-d ESTABLISHED
              tcp4       0    282  192.168.0.18.65261     www.tunnelblick..https ESTABLISHED
              tcp4       0      0  192.168.0.18.65096     173.243.12.181.https   ESTABLISHED
              tcp4       0    106  192.168.0.18.65081     17.110.228.19.5223     ESTABLISHED
              tcp4       0      0  192.168.10.2.64068     192.168.1.35.ftp       ESTABLISHED
              tcp4       0      0  192.168.1.210.54971    104.130.144.67.https   CLOSE_WAIT 
              tcp4       0      0  localhost.26164        localhost.49375        ESTABLISHED
              tcp4       0      0  localhost.49375        localhost.26164        ESTABLISHED
              tcp4       0      0  localhost.29754        localhost.49152        ESTABLISHED
              tcp4       0      0  localhost.49152        localhost.29754        ESTABLISHED
              udp6       0      0  *.64174                *.*                               
              udp4       0      0  *.64174                *.*                               
              udp6       0      0  *.50856                *.*                               
              udp4       0      0  *.50856                *.*                               
              udp6       0      0  *.50308                *.*                               
              udp4       0      0  *.50308                *.*                               
              udp4       0      0  *.50160                *.*                               
              udp4       0      0  *.*                    *.*                               
              udp4       0      0  192.168.10.2.ntp       *.*                               
              udp4       0      0  192.168.0.18.ntp       *.*                               
              udp6       0      0  *.61890                *.*                               
              udp4       0      0  *.61890                *.*                 
              

              Traceroute from client to server:

               traceroute 192.168.1.62
              traceroute to 192.168.1.62 (192.168.1.62), 64 hops max, 52 byte packets
               1  192.168.10.1 (192.168.10.1)  32.289 ms  31.075 ms  23.009 ms
               2  192.168.1.62 (192.168.1.62)  22.792 ms  22.625 ms  21.795 ms
              
              1 Reply Last reply Reply Quote 0
              • L
                lastb0isct
                last edited by

                Attached is the screenshot of my internal network.

                ![Screen Shot 2015-02-07 at 3.05.13 PM.png](/public/imported_attachments/1/Screen Shot 2015-02-07 at 3.05.13 PM.png)
                ![Screen Shot 2015-02-07 at 3.05.13 PM.png_thumb](/public/imported_attachments/1/Screen Shot 2015-02-07 at 3.05.13 PM.png_thumb)

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

                  A network diagram without at least subnets and interface addresses is about worthless.

                  See the diagram in my sig for an example of something that might help people solve your problem.

                  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
                  • M
                    marvosa
                    last edited by

                    I agree with Derelict, a network map with IP info would be helpful.  Also, those are not routing tables… you've given us a list of what is connected.  The command you're looking for is "netstat -r"

                    It looks like you have a successful connections to port 8080:

                    tcp        0      0 192.168.1.62:http-alt  192.168.10.2:64268      ESTABLISHED
                    tcp        0      0 192.168.1.62:http-alt  192.168.10.2:64266      ESTABLISHED

                    but may be having issues with 8082.

                    These connections are more telling though:

                    tcp        0      0 192.168.1.62:tproxy    192.168.10.2:64229      ESTABLISHED
                    tcp        0      0 192.168.1.62:tproxy    192.168.10.2:64227      ESTABLISHED
                    tcp        0      0 192.168.1.62:tproxy    192.168.10.2:64230      ESTABLISHED

                    "tproxy" is apparently short for "Transparent Proxy", so it looks like you have squid running in transparent mode and it's intercepting/redirecting your requests.  Start by disabling squid.

                    1 Reply Last reply Reply Quote 0
                    • L
                      lastb0isct
                      last edited by

                      Here is the netstat -r from the server:

                      Destination    Gateway        Genmask        Flags  MSS Window  irtt Iface
                      default        pfroute.apt.dat 0.0.0.0        UG        0 0          0 eth0
                      link-local      *              255.255.0.0    U        0 0          0 eth0
                      192.168.1.0    *              255.255.255.0  U        0 0          0 eth0

                      For further testing, since i finally had the opportunity to go to a friends place and test out my VPN from my laptop I was able to hit the server just fine.  I believe it might be an issues with the android client i'm using.  The only thing that wasn't working from my laptop AND my android and all other clients is forwarding traffic to the internet.  I can't get any external websites now.  I'm sure thats a rule somewhere or a setting that I need to change.

                      1 Reply Last reply Reply Quote 0
                      • M
                        marvosa
                        last edited by

                        For further testing, since i finally had the opportunity to go to a friends place and test out my VPN from my laptop I was able to hit the server just fine.  I believe it might be an issues with the android client i'm using.  The only thing that wasn't working from my laptop AND my android and all other clients is forwarding traffic to the internet.  I can't get any external websites now.  I'm sure thats a rule somewhere or a setting that I need to change.

                        Well, you have an any/any rule on your OpenVPN tab, so that rules out a firewall issue.  So, that leaves routing, DNS or NAT.  Go through the troubleshooting progression again.

                        1 Reply Last reply Reply Quote 0
                        • L
                          lastb0isct
                          last edited by

                          Thanks for all the help.  I'll diagnose again in a bit.  Had an issue last night where my pfsense box froze and lost a few settings so i will have to go back in and fix everything up again.

                          Should have configured autobackup…

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