I'm trying to set up my Pi to act as a VPN client for my corporate network (running OpenVPN).
Right now, I have two Ethernet ports on my Pi -- the builtin one (
eth0), and an external USB port (
Given that I have an internet connection on
eth1, would it be possible to set everything up so that any computer connected to
eth0 connects directly to the VPN and gets an IP from the OpenVPN server?
If possible, I'd like to be able to add a few "extra" features:
- A VPN IP for the Pi itself (preferably in a second subnet), so that I can access the Pi itself from my corporate network and send updates/similar to it.
- A way to have an IP (say
22.214.171.124) routed to the Pi itself so I can SSH and configure the Pi
How could I achieve this setup and have this gateway device?
tun(for "tunnel") virtual interface for this purpose; this works over an existing real interface but will have a second IP (i.e., you do not need to dedicate an eth port completely to it). However, the server must support this mode, so that is something you could check on. OpenVPN is widely used on linux and if you search for that ("openvpn linux", instead of, e.g., "openvpn raspbian" or "openvpn raspberry pi") you should find lots of information.