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

    Ovpn Remote Access Openvpncpnnect Android

    Scheduled Pinned Locked Moved OpenVPN
    18 Posts 2 Posters 1.2k 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.
    • GertjanG
      Gertjan @Summer
      last edited by

      @Summer said in Ovpn Remote Access Openvpncpnnect Android:

      And the firewall of SITEA and SITEB accepts connections from the OpenVPN network ?
      

      27ca8628-8de0-4346-9668-ae5fc39359e8-image.png

      You showed the firewall of the device on which the web server is running ?
      Do you run a web server on pfSense ?

      What is the interface your showing ?
      You showed just a pass rule. On where what ? How should I know if that rules is an issue ?

      The http request is send to a device on which a web-server is running : my question was : is this web server answering your requests ? Does this web server receive your requests ? You've looked at the web server logs ?
      I see no answer from this device in your packet capture.

      No "help me" PM's please. Use the forum, the community will thank you.
      Edit : and where are the logs ??

      S 1 Reply Last reply Reply Quote 0
      • S
        Summer @Gertjan
        last edited by

        @Gertjan said in Ovpn Remote Access Openvpncpnnect Android:

        You showed the firewall of the device on which the web server is running ?

        yes, it is

        @Gertjan said in Ovpn Remote Access Openvpncpnnect Android:

        Do you run a web server on pfSense ?

        Yes the default GUI

        @Gertjan said in Ovpn Remote Access Openvpncpnnect Android:

        You showed just a pass rule. On where what ? How should I know if that rules is an issue ?

        I've setup this rule on both OVPN and LAN first line (just to test).

        @Gertjan said in Ovpn Remote Access Openvpncpnnect Android:

        What is the interface your showing ?

        it's just wireshark of the Diagnostic > Packet Capture

        @Gertjan said in Ovpn Remote Access Openvpncpnnect Android:

        The http request is send to a device on which a web-server is running : my question was : is this web server answering your requests ?

        Yes the server show this log:

        OVPNCLIENTIP - - [25/Aug/2023:09:15:03 +0000] "GET /login/ HTTP/1.1" 200 25532 "-" "Mozilla/5.0 (Linux; Android 13) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/116.0.0.0 Mobile DuckDuckGo/5 Safari/537.36"
        

        @Gertjan said in Ovpn Remote Access Openvpncpnnect Android:

        I see no answer from this device in your packet capture.

        Me too but I cannot understand why.
        flow should be:

        OVPN.CLIENT > SITEAHOST
        SITEAHOST > OVPN.CLIENT
        

        if I ping OVPN.CLIENT from SITEAHOST it answer both ways, but all the rest fail:

        4e67ab74-dfa9-4b45-b00c-971b9068f045-image.png

        S 1 Reply Last reply Reply Quote 0
        • S
          Summer @Summer
          last edited by Summer

          Is there a way to look at the Internal Routing (iroute)?

          This is not a site-to-site but cannot be the case?

          Can Pfsense reache ovpnclient? Yes

          route -n get OVPN.CLIENT
             route to: OVPN.CLIENT
          destination: TUNNEL.0
                 mask: 255.255.255.0
                  fib: 0
            interface: ovpns4
                flags: <UP,DONE,PINNED>
           recvpipe  sendpipe  ssthresh  rtt,msec    mtu        weight    expire
                 0         0         0         0      1500         1         0
          

          Can Pfsense reache SITEA host ? Yes

          route -n get SITEA.1
             route to: SITEA.1
          destination: SITEA.0
                 mask: 255.255.255.0
                  fib: 0
            interface: mvneta1
                flags: <UP,DONE,PINNED>
           recvpipe  sendpipe  ssthresh  rtt,msec    mtu        weight    expire
                 0         0         0         0      1500         1         0
          

          Can ovpn client reach:

          • SITEA.1? yes traceroute show: OVPNTUNNEL.SERVER > SITEA.1

          • SITEAB.1? yes traceroute show: OVPNTUNNEL.SERVER > SITEB.1

          • pfsenseLANip ? NO traceroute got no answer.

          Can ovpn client reach HTTP server?

          http://SITEA.1/ : yes page is loaded correclty
          http://SITEA.1/login : no (page exist and it's reachable from LAN)

          Now who can interfer when adding a path after IP ?

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

            @Summer said in Ovpn Remote Access Openvpncpnnect Android:

            http://SITEA.1/login : no (page exist and it's reachable from LAN)

            Show the web server log from SITEA.1 at that moment.

            No "help me" PM's please. Use the forum, the community will thank you.
            Edit : and where are the logs ??

            S 1 Reply Last reply Reply Quote 0
            • S
              Summer @Gertjan
              last edited by

              @Gertjan
              from browser I get:

              http://SITEA.1/ : yes page is loaded correclty

              Request Method:
              GET
              Status Code:
              200 OK
              

              and from server side:

              OVPN.CLIENT - - [25/Aug/2023:15:12:47 +0200] "GET / HTTP/1.1" 200 64 "-" "Mozilla/5.0 (Linux; Android 13; Nokia X10 Build/TKQ1.220807.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/116.0.0.0 Mobile Safari/537.36"
              

              http://SITEA.1/login : no (page exist and it's reachable from LAN)

              Request Method:
              Status Code:
              it just wait forever
              

              and from server side:

              OVPN.CLIENT - - [25/Aug/2023:15:13:28 +0200] "GET /login HTTP/1.1" 301 5 "-" "Mozilla/5.0 (Linux; Android 13; Nokia X10 Build/TKQ1.220807.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/116.0.0.0 Mobile Safari/537.36"
              OVPN.CLIENT - - [25/Aug/2023:15:13:47 +0200] "GET /favicon.ico HTTP/1.1" 404 46488 "http://SITEA.1/" "Mozilla/5.0 (Linux; Android 13; Nokia X10 Build/TKQ1.220807.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/116.0.0.0 Mobile Safari/537.36"
              OVPN.CLIENT - - [25/Aug/2023:15:14:28 +0200] "GET /login/ HTTP/1.1" 200 46358 "-" "Mozilla/5.0 (Linux; Android 13; Nokia X10 Build/TKQ1.220807.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/116.0.0.0 Mobile Safari/537.36"
              
              

              but the browser is wating nothing is loaded.

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

                @Summer

                After a first [15:13:28] GET /login the web server emits a "301" or permanent redirect
                After a second [15:14:28] GET /login/ the web server emits a "200" which means "Succes, got that file, here it is", and it send a web page back to the browser

                Take note of the details : the browser was asking for content in the folder login (hence the /login/)
                The first try was using /login - this can be a file called login or login.html or login.php

                The "301" was answered by the web server as by the web server config.

                It depends on your web server settings what happens when you do a
                / (nothing) - normally it searches for the file index.html, or index.htm or index.php or ?
                /login means a file called login ? This seconds is a bit flawwed
                /login/ as / but in the /login/ folder in the web root directory.

                The browser was also looking fr the /favicon.ico file, the error code 401 means : file not found (in the web server's web root folder)

                No "help me" PM's please. Use the forum, the community will thank you.
                Edit : and where are the logs ??

                S 1 Reply Last reply Reply Quote 1
                • S
                  Summer @Gertjan
                  last edited by

                  @Gertjan Your analysis make sense, I've looked at server log as requesting the resource from LAN:

                  http://SITEA.1/login : result in a fast loading of the page

                  LAN.CLIENT - - [25/Aug/2023:15:57:40 +0200] "GET /favicon.ico HTTP/1.1" 404 50056 "http://acciaio.internal/uslat" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Mobile Safari/537.36"
                  LAN.CLIENT - - [25/Aug/2023:15:57:50 +0200] "GET /login HTTP/1.1" 301 5 "-" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Mobile Safari/537.36"
                  LAN.CLIENT - - [25/Aug/2023:15:57:50 +0200] "GET /login/ HTTP/1.1" 200 49950 "-" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Mobile Safari/537.36"
                  LAN.CLIENT - - [25/Aug/2023:15:57:50 +0200] "GET /static/app.css HTTP/1.1" 304 0 "http://acciaio.internal/static/app.css" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Mobile Safari/537.36"
                  
                  

                  But closely looking seems using dns resolver host override: that from ovpn.client fail.

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

                    @Summer

                    See my post here https://forum.netgate.com/topic/176959/host-overrides-doesn-t-override/16?_=1692970326119

                    Over there I created a host ovrride in unbound. Used OpenVPN, checked that my override worked etc.

                    No "help me" PM's please. Use the forum, the community will thank you.
                    Edit : and where are the logs ??

                    S 1 Reply Last reply Reply Quote 1
                    • S
                      Summer @Gertjan
                      last edited by Summer

                      @Gertjan so far I've edited:

                      • server config Advanced client settings:
                        189648b7-a32f-4b58-a434-ad17b8ae13ad-image.png

                      • Dns Resolver : Network Interfaces : All

                      I was using OpenVPN Connect but I guess you're using another app, because I cannot find that DNS page.

                      Tried also Android app: OpenVPN for Android by Arne Schwabe
                      Edit Profile > IP and DNS > Edit DNS.

                      But 8.8.8.8 is still in use.

                      Now with the last trick:
                      https://forum.netgate.com/post/1122380

                      Correct DNS is used with every app,

                      Now:

                      http://acciaio.internal/ : yes page is loaded correclty

                      Request Method:
                      GET
                      Status Code:
                      200 OK
                      

                      server log

                      OVPN.CLIENT - - [25/Aug/2023:16:39:33 +0200] "GET / HTTP/1.1" 403 94 "-" "Mozilla/5.0 (Linux; Android 13; Nokia X10 Build/TKQ1.220807.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/116.0.0.0 Mobile Safari/537.36"
                      

                      http://acciaio.internal/login : no stuck after

                      server log:

                      
                      OVPN.CLIENT - - [25/Aug/2023:16:39:42 +0200] "GET /login HTTP/1.1" 301 5 "-" "Mozilla/5.0 (Linux; Android 13; Nokia X10 Build/TKQ1.220807.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/116.0.0.0 Mobile Safari/537.36"
                      OVPN.CLIENT - - [25/Aug/2023:16:40:42 +0200] "GET /login/ HTTP/1.1" 200 46341 "-" "Mozilla/5.0 (Linux; Android 13; Nokia X10 Build/TKQ1.220807.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/116.0.0.0 Mobile Safari/537.36"
                      OVPN.CLIENT - - [25/Aug/2023:16:40:53 +0200] "GET /favicon.ico HTTP/1.1" 404 45114 "http://acciaio.internal/" "Mozilla/5.0 (Linux; Android 13; Nokia X10 Build/TKQ1.220807.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/116.0.0.0 Mobile Safari/537.36"
                      
                      
                      GertjanG 1 Reply Last reply Reply Quote 0
                      • GertjanG
                        Gertjan @Summer
                        last edited by Gertjan

                        @Summer said in Ovpn Remote Access Openvpncpnnect Android:

                        I was using OpenVPN Connect but I guess you're using another app, because I cannot find that DNS page.

                        I use this app to test :

                        https://apps.apple.com/us/app/he-net-network-tools/id858241710

                        @Summer said in Ovpn Remote Access Openvpncpnnect Android:

                        But 8.8.8.8 is still in use.

                        Not without humor : I'm protected against 8.8.8.8 as I use an iPhone.
                        I've nothing against 8.8.8.8, although I like to chose my own stuff, and that includes the DNS I use.
                        I can image that other Oses don't want you to give that choice.
                        After all : DNS ==> the big data .... right, bs : money !

                        More serious :

                        @Summer said in Ovpn Remote Access Openvpncpnnect Android:

                        Correct DNS is used with every app,

                        So you use the DNS of pfSense, the one you've set up in the OpenVPN server ?
                        You use a browser that doesn't over ride your DNS ?
                        I've heard that Google makes its own browser. And people even use them ( ?!!). What DNS does this browser use ? Make 1 guess. Are you surprised ?

                        No "help me" PM's please. Use the forum, the community will thank you.
                        Edit : and where are the logs ??

                        S 1 Reply Last reply Reply Quote 1
                        • S
                          Summer @Gertjan
                          last edited by

                          @Gertjan said in Ovpn Remote Access Openvpncpnnect Android:

                          So you use the DNS of pfSense, the one you've set up in the OpenVPN server ?

                          Yes

                          @Gertjan said in Ovpn Remote Access Openvpncpnnect Android:

                          You use a browser that doesn't over ride your DNS ?

                          It seems that is not happening as same behavior can be replicated with Windows 10 client.

                          I've tried layer 2 tunnel and works fine for windows, now need to understand what's happening inside Layer3 as some service works and other will not work.

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