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

    OpenVPN not working on android?

    Scheduled Pinned Locked Moved OpenVPN
    18 Posts 3 Posters 6.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.
    • johnpozJ Offline
      johnpoz LAYER 8 Global Moderator
      last edited by

      I stream video through my vpn all the time off my plex server, I don't think voip should be an issue.  Are you using udp or tcp for the vpn connection?

      An intelligent man is sometimes forced to be drunk to spend time with his fools
      If you get confused: Listen to the Music Play
      Please don't Chat/PM me for help, unless mod related
      SG-4860 24.11 | Lab VMs 2.8, 24.11

      1 Reply Last reply Reply Quote 0
      • R Offline
        richtj99
        last edited by

        Hi,

        I am using UDP which I think is the default.  I am using the LTE connection of my nexus 6p & can log into the VPN.

        I can do cameras on VPN & access the PBX web admin page but cant get the android app working on the VPN.  When i login via wifi the android app works great.  I am using Asterisk (freepbx) if it matters - Still cant get it working right over the VPN.

        1 Reply Last reply Reply Quote 0
        • D Offline
          divsys
          last edited by

          I run FreePBX (just an Asterisk Frontend GUI), but I've run straight Asterisk boxes as well.

          The only thing I had to do to get my Voip client (Zoiper) working via OpenVPN as well as in house Wifi was to enable the OpenVPN subnet on the Asterisk box.

          If I remember right when I was debugging this years ago, I turned up the verbosity on the asterisk box so I could watch the registration attempts when the phone connected.
          It was fairly obvious that the registration was denied when the phone came in via OpenVPN and the reason was clear because it tried on an "unknown" (to asterisk) network

          Remember, when you connect via OpenVPN, your phone will get a Tunnel IP address, not a LAN address.
          For the purposes of setting up Asterisk, you can treat it like you have another network that you enable as well as your original LAN.

          Works via SIP or IAX2 and UDP is just fine.

          -jfp

          1 Reply Last reply Reply Quote 0
          • R Offline
            richtj99
            last edited by

            I am also using Freepbx as my pbx.

            I saw this post:

            https://forum.pfsense.org/index.php?topic=79276.0

            I am guessing it could be related.  What I am a little confused about is on my DDWRT router with Open VPN (didnt really use it much as it was to slow) - I was able to get the sip softphone software working fine on Wifi or VPN.

            Is a possible solution to allow the tunnel network to be on the same subnet?  Maybe change the range from 192.168.5.x/24 to 192.168.5.x/25 & give 192.168.5.x/25 to the local network & put the VPN on 192.168.6.x/25 to keep it all on the same network?

            1 Reply Last reply Reply Quote 0
            • R Offline
              richtj99
              last edited by

              Do you think you could post part of your config settings on adding that second tunnel network to Freepbx?

              1 Reply Last reply Reply Quote 0
              • johnpozJ Offline
                johnpoz LAYER 8 Global Moderator
                last edited by

                your dd-wrt was prob setup as tap vs tunnel so your vpn clients were getting IPs that were on your lan network.

                The solution provided by divsys seems logical and appropriate…

                An intelligent man is sometimes forced to be drunk to spend time with his fools
                If you get confused: Listen to the Music Play
                Please don't Chat/PM me for help, unless mod related
                SG-4860 24.11 | Lab VMs 2.8, 24.11

                1 Reply Last reply Reply Quote 0
                • D Offline
                  divsys
                  last edited by

                  In FreePBX the change is part of the Extension's config, go to "Applications->Extensions-><extension you="" want="" to="" allow="">"

                  Then under "- Device Options" find "permit"

                  The entry is a "&" separated list of networks to be allowed for the extension to connect , you can have more than 2  ;)

                  Screen-FreePBX_Note.jpg
                  Screen-FreePBX_Note.jpg_thumb</extension>

                  -jfp

                  1 Reply Last reply Reply Quote 0
                  • R Offline
                    richtj99
                    last edited by

                    Thank for pointing me in the right direction.  I am still having problems though.

                    I went to the extension I am using which works fine on wifi (same app).  I connect to the VPN & nothing happens.

                    I put this:

                    192.168.168.0/255.255.255.0&192.168.167.0/255.255.255.0

                    192.168.168.0 is my main network, 192.168.167.x is my tunnel network.

                    Interestingly enough I did get this:

                    
                    Hi,
                    
                    The IP 100.99.139.197 has just been banned by Fail2Ban after
                    8 attempts against SIP on localhost.
                    
                    Regards,
                    Fail2Ban
                    
                    

                    I am assuming that is my VPN connection coming in somehow on another IP scheme - since the only way in is through the VPN (I think).

                    Any ideas what I may be doing wrong?

                    Thanks,
                    Rich

                    vpn-pbx.JPG
                    vpn-pbx.JPG_thumb

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      divsys
                      last edited by

                      Yeah, Fail2Ban has found the Tunnel address the VPN'd phone is coming in on.

                      Wait a minute 100.99.139.197 is an outside address, how did that get reported to FreePBX?
                      (Does that happen to be your current WAN address by any chance?)

                      Are you connecting your phone's VPN over your home WiFi or from outside (via cell data, neighbour's WiFi,etc.)?
                      You don't have any port forwarding setup do you?

                      What Voip app are you trying to connect in with?

                      -jfp

                      1 Reply Last reply Reply Quote 0
                      • R Offline
                        richtj99
                        last edited by

                        My cablemodem IP is:  24.190.x.x
                        My phone IP (verizon) is: really wierd looking - see the screenshot.  Maybe that is my issue?

                        When I left wifi (which was connected using Media5) to LTE, my phone sent another fail2ban message - within 2 minutes of turning off wifi.

                        I suspect that is my phone.

                        This is strange - my verizon LTE tablet is also giving some strange looking IP.  Similar to the attached.

                        My cell phone is a Nexus6p, my tablet is a samsung galaxy 10 note.

                        ![2016-05-24 21.03.52.png](/public/imported_attachments/1/2016-05-24 21.03.52.png)
                        ![2016-05-24 21.03.52.png_thumb](/public/imported_attachments/1/2016-05-24 21.03.52.png_thumb)

                        1 Reply Last reply Reply Quote 0
                        • D Offline
                          divsys
                          last edited by

                          That IP address is IPv6, there should be a different IPv4 address as well.
                          You may (should) be able to turn off IPv6 addressing for initial testing purposes - just to eliminate variables.

                          Is the Voip app built into the phone or is it something you've added?

                          -jfp

                          1 Reply Last reply Reply Quote 0
                          • R Offline
                            richtj99
                            last edited by

                            I didnt realize that Verizon went with IPv6.  I am not sure how to turn it on or off on my devices.  I will have to check it out though.

                            I am using Media 5 for my softphone:

                            https://play.google.com/store/apps/details?id=com.media5corp.m5f.Media5fone&hl=en

                            1 Reply Last reply Reply Quote 0
                            • D Offline
                              divsys
                              last edited by

                              Haven't used that particular Voip app before.

                              Perhaps you could try Zoiper (its free and the one I use regularly) just to see if another app responds the same way.

                              -jfp

                              1 Reply Last reply Reply Quote 0
                              • R Offline
                                richtj99
                                last edited by

                                Perfect - you fixed the PBX issue for me!  Zoiper works well!

                                Only two other issues for me seem to be related to external web traffic.

                                If I am browsing facebook or reddit it works fine on:  Wifi or cell service.  If I log into the VPN, the web isnt loading anymore.

                                It seems like I am good for internal things on my network (for the most part) Root Explorer on Android is having a hard time browsing SMB folders on my freenas box over VPN but works fine on wifi.

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