Note: it is for bridge mode only
I found that Raspberry Pi is a good choice for setup OpenVPN server. I can always power on it as the power consumption is low. After setting it up, I can connect VPN to home in office or cafe outside.
You may think port forwarding by router or via SSH is good enough. However, there are limitations when:
- there are lots of services you want to connect from outsider, then your port forwarding rules will be massive
- as the OpenVPN client can reconnect automatically, I can have a relative stable connection. Sometimes you would like to have a reserve connect from server to client. My own experience is that in my previous company, I setup OpenVPN client in office and connect to my home, leave the connection alive. Then when I go home I can reconnect to my office PC by remote desktop :)
Objective
- Internal network: 192.168.28.0/24
- Setup a OpenVPN server such that client connection will connect to the server and assign a 192.168.28.0/24 IP as if it is within the internal network
- necessary install
apt-get install bridge-utils openvpn