Effect: All traffic to the vpn-gateway(say M1) will be redirect to vpn server which M1 connects to. Also, devices behind M1 don't need to setup VPN configurations.
Needs:
Implement detail:
- vpn server:
- OS use: ubuntu 16.04
- follow instruction: https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-ubuntu-16-04
vpn-client: included in the above guide, ommited
dhcp-server
firewall
- dhcp-server:
- $ apt install install isc-dhcp-server
- # google some config, fill them
- "option dns-server" use the vpn server's
- use ufw
- similar to vpn server
- but redirect traffic from dhcp subnet to interface:tun0
看看等我忘了這件事之後我還有沒有辦法做出來
給不懂英文的人說明效果:
做一個gateway,它會將所有經過它的流量導向它連上的VPN。如此一來在這個gateway後面的機器不需要做任何VPN設定。
又因它是自己建的,OS我自己手上。我可以用虛擬機開它,這樣就不需要買外面的ip分享器然後還可能不安全。