There already are various articles that describe how to connect to a VPN using SoftEther on Linux. Even after following several of them, I wasn't able to connect to a VPN on my Manjaro Linux machine. I had issues especially on the last step where we need to create the routing rules manually. Here's what worked for me.
- Download SoftEther client from its website, and install the same.
- Start vpnclient using
sudo ./vpnclient start
./vpncmd
- Enter
2
for Management of VPN Client - Enter
(blank)
for localhost - NicCreate (then enter the name, say "VPN")
- AccountCreate (then enter Account_Name, VPN_Server, Hub_Name, Username, Nic_Name)
- AccountPasswordSet. Specify
standard
as the type. Many articles suggestedradius
, but standard worked for me. - AccountConnect
- AccountList should now show status
Connected
for Account_Name.
Exit vpncmd and run these commands on a shell.
-
echo 1 > /proc/sys/net/ipv4/ip_forward
Run this as root. (Actually I'm not sure if this is required.) -
sudo dhclient vpn_vpn -v
. Here, we're assuming Nic_Name above is "VPN". In the output, note the Gateway_address. For example, I saw a lineDHCPACK of 192.168.30.12 from 192.168.30.1
. Here192.168.30.1
is the Gateway_address. - You can also find Gateway_address by running
ip route
. Here you will see a route rule likedefault via 192.168.30.1 dev vpn_vpn
. We don't need it. -
sudo ip route del default via 192.168.30.1
. Replace192.168.30.1
with your Gateway_address. -
sudo ip route add 192.168.4.0/24 via 192.168.30.1
. Again, replace192.168.30.1
with your Gateway_address, and replace192.168.4.0/24
with the network address range you're trying to connect to. I my case, the remote network was in the range 192.168.4.*, so I used 192.168.4.0/24.
Thank you and wish you the best.
Top comments (0)