Questions about setting up OpenVPN server

I would like to set up an OpenVPN server at home so I can access my home network from other places. I plan to have a NAS, a general purpose server that runs Ubuntu and OpenVPN, router port forwarded to the OpenVPN server, and a bunch of regular computers. I’m currently in the planning state. Assume I’m in Los Angeles on vacation with a Windows laptop and my home is in New York.

After using the OpenVPN client on default settings, will all network traffic automatically go through the VPN? Will it be the equivalent of being a direct connect to an Ethernet port on my Ubuntu server? If I use a web browser in Los Angeles, would the internet treat it identical to me using a web browser directly on the Ubuntu server in New York? Would I automatically see any shared network folders (e.g. Windows shared folders, Samba) in my New York LAN on my laptop in Los Angeles?

You decide yourself, through basic network routing rules, which traffic will go via your VPN server. You decide yourself if you want everything, or just selected subnets.

Depending on what you decide to route via your VPN server also defines how your location (based on the public VPN server IP address) will look like on the Internet. If you decide to just route the network where you have your Samba shares, then that’s all you will have access to when starting the VPN connection.

A reasonable place to start getting to understand the OpenVPN setup can be here: https://community.openvpn.net/openvpn/wiki/GettingStartedwithOVPN

Otherwise, there are two great books available too: “OpenVPN 2 Cookbook” (by Jan Just Keijser) and “Mastering OpenVPN” (by Eric Crist and Jan Just Keijser).

To setup a VPN, you do need to have a pretty good understanding of basic networking, subnetting and network routing. And you will also need to play a bit with firewalling too. But when you have a grip of that, setting up a VPN is pretty easy.

You have to configure the client (or tell the Openvpn server to configure the client) so it knows what subnets are behind the Openvpn server.

Also remember that any servers (shared folders) on the home lan need to know the route back (gateway) for traffic originating from the Openvpn client.

The client can be configured to either send all traffic via the vpn or just routed traffic.

If you are having difficulty with the open VPN syntax and command line interaction, look at installing open VPN access server on an Ubuntu virtual machine. It gives you a graphic interface and it is easy to set up split tunnel versus full tunnel on the gui.