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

    Can I use one of my 6 physical network ports to be a vpn port?

    Scheduled Pinned Locked Moved OpenVPN
    55 Posts 3 Posters 9.8k 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
      johnpoz LAYER 8 Global Moderator
      last edited by

      @mbc0 said in Can I use one of my 6 physical network ports to be a vpn port?:

      TPLink TL-SG108PE

      Not sure would call those managed or smart... They have had huge issues with vlan leakage, since some firmware doesn't allow you to remove vlan 1 from ports you want to put in a different vlan.

      If your going to connect this physical port to a server, then sure everything on that network could be policy routed out your vpn connection you setup in pfsense.

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

        lol ok, I actually only bought it for it's POE conections so it is no loss but also after what you said and some googling it is not a very good/smart switch. I would prefer to create a physical port on pfsense to acheive what I am looking to do.

        I am struggling with the correct terminology to find a good guide to follow, can you please recommend anything?

        I did watch a video yesterday regarding policy routing the vpn connection so will check/double check and run dns leak tests!

        You have been so helpful, thank you so much for your time.

        1 Reply Last reply Reply Quote 0
        • JKnottJ
          JKnott @mbc0
          last edited by

          @mbc0 said in Can I use one of my 6 physical network ports to be a vpn port?:

          (TPLink TL-SG108PE)

          Some TP-Link gear doesn't handle VLANs correctly. Best to avoid them, if you're planning on using VLANs.

          PfSense running on Qotom mini PC
          i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
          UniFi AC-Lite access point

          I haven't lost my mind. It's around here...somewhere...

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

            Many thanks for chipping in, can I ask what is generally recommended for VLAN switches for future use please?

            JKnottJ 1 Reply Last reply Reply Quote 0
            • JKnottJ
              JKnott @mbc0
              last edited by

              @mbc0

              Pretty much anything other than TP-Link. I haven't heard of problems with other brands. They also have similar problems with some WiFi access points.

              PfSense running on Qotom mini PC
              i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
              UniFi AC-Lite access point

              I haven't lost my mind. It's around here...somewhere...

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

                ah, ok thank you! I have a couple of standard gigabit switches which have never caused me an issue, a wireless ap which needed rebooting every day (went in the bin) so in future will avoid TP-Link, thank you

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

                  if your just going to use it as a dumb switch - then they should be fine... But doesn't seem like they actually understand how vlans are suppose to work ;) There are many a thread about here discussing them... I have one, which I got to test with because I couldn't believe what users were saying ;) heheheh

                  But they were correct - they leak vlans, they don't actually allow you to remove... Now they finally after almost a year came out with a firmware update for v3 of hardware, and recently found out (there is a thread about) where you can put the v3 firmware on the v2 hardware - and it seems to work ;)

                  What version (hardware) and firmware do you have of this tplink switch?

                  I have both the netgear and dlink low end ones as well (testing) I run cisco sg300s.. And they work fine from all the testing I have done on them.. But they just don't do all the features I want... But they are on shelf if need a switch for something - you never know ;)

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

                    Sadly mine is a V1.0 so I think it will just remain a dumb switch with POE :-)

                    I am going to attempt to see if I can work out how to get a port on my pfsense to be a VPN connection only so should be ok and not need a vlan (for now) ;-)

                    Thank you for taking the time to respond :-)

                    JKnottJ 1 Reply Last reply Reply Quote 0
                    • M
                      mbc0
                      last edited by

                      I am just following this guide from PIA

                      https://www.privateinternetaccess.com/forum/discussion/29231/tutorial-pia-on-pfsense-2-4

                      There is a section that says if you have an AES-NI it is advised to select BSD cryptodev engine but I can only see Intel RDRAND Engine? I have an i5-3470T which I bought because it has AES-NI

                      Thanks!

                      1 Reply Last reply Reply Quote 0
                      • JKnottJ
                        JKnott @mbc0
                        last edited by

                        @mbc0 said in Can I use one of my 6 physical network ports to be a vpn port?:

                        Sadly mine is a V1.0 so I think it will just remain a dumb switch with POE :-)

                        You could do what I did with mine, I made it into a [data tap].(https://en.wikipedia.org/wiki/Network_tap)

                        PfSense running on Qotom mini PC
                        i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                        UniFi AC-Lite access point

                        I haven't lost my mind. It's around here...somewhere...

                        M 1 Reply Last reply Reply Quote 1
                        • M
                          mbc0 @JKnott
                          last edited by

                          @JKnott said in Can I use one of my 6 physical network ports to be a vpn port?:

                          @mbc0 said in Can I use one of my 6 physical network ports to be a vpn port?:

                          Sadly mine is a V1.0 so I think it will just remain a dumb switch with POE :-)

                          You could do what I did with mine, I made it into a [data tap].(https://en.wikipedia.org/wiki/Network_tap)

                          That looks like an interesting read! :-) Thank you!

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

                            Hi!

                            I have made good progress but have 2 questions! :-)

                            I have followed these instructions

                            https://www.privateinternetaccess.com/forum/discussion/29231/tutorial-pia-on-pfsense-2-4

                            and now, my all 4 used interface ports are behind the vpn which is great that it is working but I now need to remove 3 of them so just a single port is behind the vpn in my case PIAVPN (igb3)

                            d342de8c-b57a-4d05-8544-11252242ce11-image.png

                            I see I had to create a new rule for each interface in Outbound nat (as per the guide) is that where I have gone wrong?

                            Any pointers greatly appreciated!!

                            Thank you

                            784b1367-0b99-4612-a04c-825933a1a84b-image.png

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

                              Well, I have googled the hell out of this and saw one guy on the forums get stroppy about it (now banned) , another that had spent 2 weeks trying to find a way but that is it? I am very sorry if this is such an easy thing to you but to someone like me it is incredibly hard to learn quickly, there is so much terminology to learn as well as understanding complex settings. If anyone has any time to just point me in the right direction of what I should be searching for or doing to resolve this I would really appreciate it!

                              If I go to Status/OpenVPN and start the service all interfaces then go through the VPN which is expected but I would only like 1 interface to go through the vpn (igb3)

                              abe439be-e836-4340-8855-09c242437b79-image.png
                              Many Thanks :-)

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

                                @mbc0 said in Can I use one of my 6 physical network ports to be a vpn port?:

                                start the service all interfaces then go through the VPN which

                                Most likely because you pulled routes when when you setup the vpn client in pfsense.. So yeah!

                                If you want to policy route, you can not pull routes from your vpn service because they will set your default route to go through them..

                                So do not pull routes! Here example setup in my vpn client setup on pfsense..

                                pullroutes.jpg

                                Then setup your firewall rules to go out that gateway.. example..

                                policyroute.jpg

                                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

                                M 1 Reply Last reply Reply Quote 0
                                • M
                                  mbc0 @johnpoz
                                  last edited by

                                  @johnpoz

                                  Thanks so much for this!

                                  I think I must be really close now but I do not understand where you get the ip for System/Routing/Gateways?

                                  783d7441-09fd-41a3-9ac1-a51e1390b988-image.png

                                  M 1 Reply Last reply Reply Quote 0
                                  • M
                                    mbc0 @mbc0
                                    last edited by mbc0

                                    @johnpoz I have tried using the ip of my interface for igb3 which is the port I want for PIA and although I can connect to the port, windows says there is internet but there actually isn't? I cannot see the outside world?

                                    9faaeae3-8e08-40ea-bfe6-e8a3f82ecca7-image.png

                                    36e0b9f2-9f69-4df4-8087-b21b9c8a5b99-image.png

                                    9b22fcae-3a20-49dd-af65-557fc5c479fd-image.png

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

                                      Your gateway is right there, its called PIAVPN - that is what you would select for the policy route, under advanced on the rule pick that as the gateway... Not the IP..

                                      It pulls that IP from the vpn server it connects too.

                                      Also did you switch to manual outbound nat? Yeah that is going to be problematic - you should leave it as auto, and just create a hybrid outbound nat for your vpn connection... And the tunnel network used by the vpn can not overlap any network your actually using locally.

                                      hybridoutboundnat.jpg

                                      Don't pay attention to that hybrid lan nat, that is a source nat so I can get to a box without a gateway... Has nothing to do with policy routing.

                                      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

                                      M 1 Reply Last reply Reply Quote 0
                                      • M
                                        mbc0 @johnpoz
                                        last edited by mbc0

                                        @johnpoz said in Can I use one of my 6 physical network ports to be a vpn port?:

                                        Also did you switch to manual outbound nat? Yeah that is going to be problematic - you should leave it as auto, and just create a hybrid outbound nat for your vpn connection

                                        I followed the privateinternetaccess pfsense guide mentioned in post #12, here is an excerpt from it.

                                        301ee0fa-7eab-46df-8f1a-f97bd06ff4a5-image.png

                                        So, here is what my screens look like now

                                        3b53bdd2-2a3d-49cd-a8ee-4f039d58bc3c-image.png

                                        30fdb644-5858-4efc-a028-a2dea4872429-image.png

                                        b2273875-d31b-4877-8d15-0f8fc879922d-image.png

                                        I have tried setting the ip of the source network to 192.168.2.1 as this is the ip of the interface but it automatically changes it back to 192.168.2.0

                                        As things stand the OpenVPN PIA Service is running and connected but nothing on the LAN is running through that.

                                        If I connect to the igb3 port on pfsense (PIAVPN) I can ping anything on the LAN but cannot connect to anything (unraid, ip cameras etc) I also cannot connect to the outside world from this port.

                                        I think that if the instructions from pia to change to manual outbound nat is incorrect then there is probably more mis-information in that guide. Is there an alternative guide you are aware of or am I still missing something?

                                        Many thanks for your time and patience so far, it is really appreciated!

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

                                          @mbc0 said in Can I use one of my 6 physical network ports to be a vpn port?:

                                          I have tried setting the ip of the source network to 192.168.2.1

                                          Why are you trying to set an IP... You would NOT set an ip on a vpn client connect to some vpn service..

                                          Their guides are written by idiots for their idiot users.. Sorry but that is my personal opinion of these nonsense service..

                                          Point to me in their guide where it says to set an IP on your interface???

                                          Lets say you where required to set a static on the interface - you still can not have the same network locally as your tunnel network.. You can not use 192.168.2/24 on one of your networks, and 192.168.2/24 as your tunnel to the vpn service..

                                          Where is your gateway??? You manually created that gateway pointing to your own local interface on 192.168.2.1??

                                          So you didn't follow there guide at all!! Is what your saying - your just saying you did... Because no where in there does it say to do that...

                                          What I would suggest is just remove ALL the settings for any vpn anything... Switch to normal automatic and then get this new network working... Then setup your vpn!

                                          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

                                          M 1 Reply Last reply Reply Quote 0
                                          • M
                                            mbc0 @johnpoz
                                            last edited by mbc0

                                            Hi,

                                            Firstly, I understand your frustration and I totally get it! I am an engineer of 30 years and find it very frustrating explaining things to people that just cannot understand what I am explaining. Please remember I am a complete novice trying my best to understand and follow what I thought was an official guide from PIA which has in it's defence worked for all my interfaces but I need it to work for just one interface, the guide does not cover that.

                                            > Why are you trying to set an IP... You would NOT set an ip on a vpn client connect to some vpn service..]

                                            I was doing this as unless I specified an IP it just stays at dynamic and does not show an IP
                                            a2fe0028-cdf6-4ae5-bc9e-75bc8e27d7c3-image.png

                                            > Their guides are written by idiots for their idiot users.. Sorry but that is my personal opinion of these nonsense service..]

                                            I understand your opinion :-)

                                            > Point to me in their guide where it says to set an IP on your interface???

                                            It does not say this anywhere in the guide as their guide is only to put all interfaces behind the vpn which as I previously stated works, I cannot find any guide or understand any way to do this for just one interface.

                                            > Lets say you where required to set a static on the interface - you still can not have the same network locally as your tunnel network.. You can not use 192.168.2/24 on one of your networks, and 192.168.2/24 as your tunnel to the vpn service..

                                            I am so sorry I am not fully understanding this, I have 4 interfaces in use
                                            wan
                                            lan - I set an IP of 192.168.0.10
                                            Unifi - I set an IP of 192.168.1.5
                                            PIAVPN - I set an IP of 192.168.2.1

                                            > Where is your gateway??? You manually created that gateway pointing to your own local interface on 192.168.2.1??

                                            0fa0e06f-196c-4ea4-aec6-dd2ee41875bf-image.png

                                            So you didn't follow there guide at all!! Is what your saying - your just saying you did... Because no where in there does it say to do that...

                                            Yes I did follow the guide completely and it worked perfectly but for all interfaces, I need this to be on just one interface.

                                            What I would suggest is just remove ALL the settings for any vpn anything... Switch to normal automatic and then get this new network working... Then setup your vpn!

                                            I have had this interface working fine the whole time and have been using it for some months before trying to get OpenVPN working.

                                            In a nutshell
                                            All interfaces have been working fine for some time now.
                                            I followed the PIA Guide and all worked great for all interfaces then the problem is trying to get it to work just on one interface.

                                            Again, I really am genuinly sorry as I know how frustrating this must be.

                                            Thanks

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