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

    openvpn shall use local network

    Scheduled Pinned Locked Moved OpenVPN
    22 Posts 4 Posters 2.3k Views 4 Watching
    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.
    • KOMK Offline
      KOM
      last edited by

      I think he's trying to do it locally while connected to his VPN, as in his phone is on VPN all the time.

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

        Thats just stupid ;)

        Not going to be able to do it.. Even if you used tap vs tun... Since phone on the same wifi network Ie 192.168.0/24 and now you want to tap vpn and also get a 192.168.0

        It takes 2 freaking seconds to disconnect vpn, or just block access to vpn while you on your local network..

        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 25.07.1 | Lab VMs 2.8.1, 25.07.1

        1 Reply Last reply Reply Quote 0
        • P Offline
          pooperman
          last edited by

          haha I havent thought it is so hard to explain.

          I have unlimited cellphone traffic and I dont want to switch to wifi... too hard to explain.

          plex (phone) is having the feature to control other plex clients (eg. pc), like spotify.

          I want to use that function to control my pc from my phone via vpn tunnel on cell network.

          what do I need to do, to archive that?

          1 Reply Last reply Reply Quote 0
          • KOMK Offline
            KOM
            last edited by

            It isn't hard to explain. You just didn't do a good job of making yourself clear. That's why we're here guessing as to what you're trying to do.

            If you must be on VPN all the time, and you must access your thing via phone remote, then your only option is to port-forward your thing interface out to WAN just like you would do if it was a web server. Then you can access it from the public Internet.

            1 Reply Last reply Reply Quote 0
            • P Offline
              pooperman
              last edited by

              nah that is a very bad solution.

              is there no way like routing the trafic of 192.168.0.* network to 192.168.8.* network?

              I am able to see everything in my network from the vpn phone, but not the other way round?

              1 Reply Last reply Reply Quote 0
              • KOMK Offline
                KOM
                last edited by

                We don't know any details about your network nor your VPN config. Perhaps your VPN app, whatever it is, allows local traffic to flow normally instead of routing literally everything though the VPN. We don't know if it supports policy routing. If your phone and these devices are all on the same LAN then pfSense has nothing at all to do with it. Check your VPN app configuration.

                1 Reply Last reply Reply Quote 0
                • P Offline
                  pooperman
                  last edited by

                  I thought i have provided all information about ip addresses.. anyway here we go:

                  iphone 6 with openvpn app

                  pfsense with latest version and latest openvpn installed

                  App settings;
                  Seamless Tunnel on
                  VPN protocol TCP
                  DNS fallback off
                  layer 2 off

                  plex server ip 192.168.0.121/24
                  pc ip 192.168.0.118/24
                  phone ip via vpn 192.168.8.1/24

                  is something else required?

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

                    @pooperman said in openvpn shall use local network:

                    too hard to explain.

                    Don't worry about it - don't care.. Have fun with such nonsense.. You have devices on your local network you want to interact with at L2, ie same broadcast domain.. Then connect to this network..

                    If you want to vpn into your network via this vpn connection and be on the same L2, then you would have to use tap vs tun... But you can not also be connected to the wifi.. But if you stay on the LTE then you could do it.

                    But that is just freaking moronic. .And sure not going to be "fast" why would you want to add that sort of latency and instability to your control - delay, etc. Click on control to pause song and doesn't work or takes 2-10 seconds to kick in.. When your right there local..

                    There is zero way to explain such nonsense..

                    edit: Well iphone, so you can not do tap anyway.. Have fun, since you know connecting to your local wifi would be so hard ;) You know yoru phones like auto do it when they get near... Simple button your home screen to connect and disconnect your vpn.. You could automate that as well.

                    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 25.07.1 | Lab VMs 2.8.1, 25.07.1

                    1 Reply Last reply Reply Quote 0
                    • P Offline
                      pooperman
                      last edited by

                      let us not discuss sense or nonsense, in my case there is a purpose and I am just in hope that we can find a solution without offtopic discussions.

                      Layer 2 is not an option, i need to have layer 3

                      please forget wifi, we are only talking about cellphone internet via vpn.

                      is there no way like bridging vpn network to 192.168.0.* network?
                      adding another vpn client in 192.168.0.* network?

                      come on guys you are the experts, cant be that there is no way for doing that.

                      1 Reply Last reply Reply Quote 0
                      • KOMK Offline
                        KOM
                        last edited by

                        I am able to see everything in my network from the vpn phone, but not the other way round?

                        If you can see all your LAN clients with VPN on then it's not directing all traffic out the VPN. Is your wifi on the same LAN or is it on a different subnet? If same LAN then pfSense is not involved at all.

                        P 1 Reply Last reply Reply Quote 0
                        • P Offline
                          pooperman
                          last edited by

                          @KOM said in openvpn shall use local network:

                          I am able to see everything in my network from the vpn phone, but not the other way round?

                          If you can see all your LAN clients with VPN on then it's not directing all traffic out the VPN. Is your wifi on the same LAN or is it on a different subnet? If same LAN then pfSense is not involved at all.

                          it is not about out rather then in.

                          phone connects via cell internet via vpn to www.mydoinain.org
                          this redirects it to openvpn servers ip address, goes in via open port in pfsense, goes to pfsense dns server, goes to plex server.

                          so I am able to see all clients and use the tunnel for ALL communication. inside 192.168.0.* network and www

                          but from 192.168.0.* network I cannot see openvpn client.
                          therefore I assume it is something like a virtual network or a rule which block it or just missing routing.

                          1 Reply Last reply Reply Quote 0
                          • P Offline
                            pooperman @KOM
                            last edited by

                            @KOM said in openvpn shall use local network:

                            I am able to see everything in my network from the vpn phone, but not the other way round?

                            If you can see all your LAN clients with VPN on then it's not directing all traffic out the VPN. Is your wifi on the same LAN or is it on a different subnet? If same LAN then pfSense is not involved at all.

                            please forget WIFI, there is no wifi, I am only connected vi cellphone internet

                            1 Reply Last reply Reply Quote 0
                            • KOMK Offline
                              KOM
                              last edited by

                              OK, all of that info would have been good to know from your very first post.

                              So your VPN is in to yourself. What rules do you have on your OpenVPN interface in pfSense? Just the default one that gets created by the OpenVPN Remote Access wizard? Any other packages running like SNort or Suricata? Anything showing as blocked in your firewall log while testing? Are you running a web proxy like squid?

                              P 1 Reply Last reply Reply Quote 0
                              • P Offline
                                pooperman @KOM
                                last edited by

                                god damn.... found the problem.

                                there was a rule missplaced

                                it is now working fine!

                                1 Reply Last reply Reply Quote 0
                                • KOMK Offline
                                  KOM
                                  last edited by

                                  You're welcome.

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

                                    Your using DLNA, which is how plex finds player from your vpn connection from your phone via your LTE connection... Sorry but no I don't think so..

                                    So your you are either doing something else other than what I Linked to, or your mistaken.. Did you setup pimd or the igmp proxy in pfsense for your vpn connection? Is your iphone rooted and you can use tap mode, etc.

                                    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 25.07.1 | Lab VMs 2.8.1, 25.07.1

                                    P 1 Reply Last reply Reply Quote 0
                                    • P Offline
                                      pooperman @johnpoz
                                      last edited by pooperman

                                      @johnpoz
                                      problem is solved.

                                      i excluded some ip addresses in the rules table. so in case someone hacks in, the impact would be low.

                                      of course the ip address of the pc was in that rule set xD

                                      my bad, but KOM brought me to that point to recheck the rules.
                                      by the way, thanks for that buddy

                                      iphone is not rooted or else, everything is just pure gui configuration without any special modification

                                      1 Reply Last reply Reply Quote 0
                                      • KOMK Offline
                                        KOM
                                        last edited by

                                        OK, he's fixed up. Let's call it a day.

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