I need advise as to whether what I'm trying to do is possible or not.

I have a spare laptop and plan to make the most of it by setting it up as my router. Basically connect my modem directly to this laptop and have this laptop act as my router. The laptop currently only has 1 ethernet port which I plan to use for WAN. Then I plan to add another ethernet (usb to lan adapter) for LAN purposes which will connect to a tp-link deco m5 to be my access points and wi-fi too.

Reason I'm doing this is I want to setup a vpn server (probably openvpn) at home because I want to secure this web application I'm hosting (SSL and Authentication already setup) and only make it accessible to certain people. Also, I want to setup another vpn (client for i.e. ExpressVPN) so that I can watch netflix, hulu, primevideo etc without region restriction.

If it is possible, could you please give me some info on how to do it. I can use ubuntu or centos as my server OS. I can also use clearOS if it makes a difference.

Appreaciate any feedback.


Adding info for reference.

  • Dell N4050 Inspiron
  • Intel NM10 Express Chipset
  • Intel Core i3-i5-2310M
  • 4GB 1333MHz DDR3 RAM
  • Intel HD Graphics 3000 AMD Radeon HD 7450M – 1GB
  • NIC 10/100

My ISP speed is going to be maxed at 100 Mbps. I'm hoping that an ethernet of 10/100 Mbps should be enough. Although I plan to use a gigabit switch after the laptop going to the access points.

  • I personally would recommend a Sophos UTM Software Appliance [SA] over pfSense. A home use license is free, but not sure how it responds to USB adapters. If it does support them, the USB adapter would need to be connected before booting up the installer. Another option would be to use an actual router or MB with >1 LAN port & install FreeNAS on the laptop
    – JW0914
    Dec 10 '19 at 5:43
  • @JW0914 Thanks for the feedback. The router I'm currently using is PROLink WNR1008 but it lacks VPN support. I was planning on using this as a switch which connects the laptop to other devices (i.e. tp-link deco m5, android tv (ethernet) etc.). Also, I actually have a FreeNAS setup. What do you suggest I setup in the FreeNAS? I originally wanted to setup the FreeNAS as a DHCP server and also install VPN on it but the gentlemen over at FreeNAS (ixsystems.com/community/threads/dhcp-server-on-freenas.13079) do not recommend it as a dhcp server.
    – ads
    Dec 10 '19 at 5:50
  • FreeNAS isn't meant to be used as a router, which is why configuring it as a DHCP server isn't recommended, however, you could set up OpenVPN in a jail. There's threads on how to do so on the FreeNAS forum. You would need to add a DNAT port redirect fule on the router for the port you use for OpenVPN, passing to the IP of the FreeNAS jail and port of the VPN. I personally find pfSense more difficult, from an efficiency standpoint, when compared to Sophos UTM, however if either works w/ the USB adapter, go that route since you'll also benefit from the CPU for encryption (AES128 is sufficient)
    – JW0914
    Dec 10 '19 at 6:05
  • Yes, this can be done - using any variant if Linux. I was doing this 20 years ago! Most embedded routers use Linux under the hood. That said once you factor in the cost of electricity you are better off getting a suitable consumer router which supports dd-wrt and using that (to act as a VPN client). That way you deal with a simple web Interface, higher interface speeds, no extra parts and something that uses a fraction of the power - at 10c per kWh and a 40 watt saving $35 per year - enough to pay off the correct tool in 1-2 years!
    – davidgo
    Dec 10 '19 at 7:31
  • Also, I've not used it, but if you want to go the x86 route, consider zeroshell.org
    – davidgo
    Dec 10 '19 at 7:33

Consider using pfSense. It is a full distribution of FreeBSD which has pretty comprehensive routing capabilities. You can install OpenVPN, as you mentioned, on top of pfSense to act as your vpn server. OpenVPN can also be configured to act as your VPN client.

However, I will note that if you wish to secure a server to specific people, often leaving it public is sufficient as long as you incorporate proper authentication. Check out .htaccess style authentication (if this is not what you already have). Also check out this Security stackexchange question about the amount of security you get with htaccess, and note in particular the use of SSL being important, and restricting access to your htaccess and htpasswd files. If you think a VPN server is worth the effort, go for it. If not, this is the next best alternative.

One thing to keep in mind is reliability. A laptop may not have the same stability as an actual router. If it were a desktop or server, it may work out better for you. Proceed at your own risk.

  • Thanks for the feedback. I'm looking at pfSense now. I'm hoping it wouldn't be difficult to setup. Also, I'm planning on removing the web application from public access and just allow intranet access. I was thinking a VPN will still allow me to access the application event if I'm outside my network. My apologies as I failed to mention that on my question.
    – ads
    Dec 10 '19 at 5:17
  • 1
    I use the same method to securely access lan-only resources, and so do many enterprises. I was just saying that if setting up a VPN is too much trouble for you, you can port forward it as long as there are other security measures. Dec 11 '19 at 1:45
  • After a year of research, I've decided to go with this route. I also checked my laptop's power consumption and it plays around 20-25kwH which is acceptable for me.
    – ads
    Jan 2 '21 at 23:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.