Linux—SoftEther_VPN_Routing

Situation

# 連上SoftEther_VPN之後不知道要怎麼用
Connected to SoftEther VPN but don’t know how to use it.

Solution

[1]
# 確認IP
CMD > ip addr show > "Your_VPN_NIC"

[2-1]
# 如果沒有自動取得IP,檢查是否有dhclient套件
which dhclient
> sudo apt install dhclient

[2-2]
# 讓介面取得IP
sudo dhclient "Your_VPN_NIC"

[3]
# 確認路由表,Default Route如果往VPN介面會有問題
CMD > ip route list


[4]
# 新增Underlay Routing
sudo ip route add "Server_IP" via "Local_Subnet_Gateway"

# 預設會把Defualt Route給VPN NIC,想要Split_Tunnel的話要自己調整
sudo ip route delete default via "VPN_Gateway"
sudo ip route add "Remote_Network" via "VPN_Gateway"