Can I use one of my 6 physical network ports to be a vpn port?
-
Hi,
As the title suggests I would like to know if it is possible to use one of my 6 physical ports to be a VPN port so everything connected to it automatically goes through my PIA account with a killswitch or would I be better off creating a VLAN? I do not fully understand each possibility (if indeed they are possibilities) but looking for the best way to acheive an rj45 connection that is secure.
Many Thanks!
-
Sure you can put a network on any of your interfaces and policy route the traffic out a vpn service.. Just like you can with a vlan.. The only difference between a native network on an interface vs a vlan, is vlans would be tagged..
What exactly are you going to connect to this port? A different switch, an AP.. Keep in mind that if you connect native network to a switch that your using for other interfaces you would not have isolation unless the switch supports vlans and your running vlans on this switch.
-
Thank you so much for your detailed reply!
I do have a managed switch (TPLink TL-SG108PE) I could use for vlans but I have to be honest it was not very intuitive and did not respond how I expected to the settings resulting in quite a mess with two ip ranges spreading throughout my large(ish) network. I thought it would make more sense to use one of the spare ports on my pfsense machine (HP Microserver running unraid and pfsense VM)
The objective is to create a VPN network that I can use in another unraid server that certain VM's & Dockers can use to connect. My thinking was that I could use a pfsense PIA VPN physical port to a spare port on my other unraid server so I can route certain dockers to that port.
just to clarify I have two machines
HP Microserver running unraid, pfsense & Ubiqity Unifi (VPN Not Required On This Machine)
Another rackmount running unraid with VM's & Dockers I would like to go through a VPN Network.
Thank you!
-
@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.
-
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.
-
@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.
-
Many thanks for chipping in, can I ask what is generally recommended for VLAN switches for future use please?
-
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.
-
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
-
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 ;)
-
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 :-)
-
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!
-
@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)
-
@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!
-
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)
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
-
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)
Many Thanks :-) -
@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..
Then setup your firewall rules to go out that gateway.. example..
-
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?
-
@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?
-
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.
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.