DEV Community

Vaibhav Kulkarni
Vaibhav Kulkarni

Posted on

Using SoftEther VPN client on Linux

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.

  1. Download SoftEther client from its website, and install the same.
  2. Start vpnclient using sudo ./vpnclient start
  3. ./vpncmd
  4. Enter 2 for Management of VPN Client
  5. Enter (blank) for localhost
  6. NicCreate (then enter the name, say "VPN")
  7. AccountCreate (then enter Account_Name, VPN_Server, Hub_Name, Username, Nic_Name)
  8. AccountPasswordSet. Specify standard as the type. Many articles suggested radius, but standard worked for me.
  9. AccountConnect
  10. AccountList should now show status Connected for Account_Name.

Exit vpncmd and run these commands on a shell.

  1. echo 1 > /proc/sys/net/ipv4/ip_forward Run this as root. (Actually I'm not sure if this is required.)
  2. 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 line DHCPACK of 192.168.30.12 from 192.168.30.1. Here 192.168.30.1 is the Gateway_address.
  3. You can also find Gateway_address by running ip route. Here you will see a route rule like default via 192.168.30.1 dev vpn_vpn. We don't need it.
  4. sudo ip route del default via 192.168.30.1. Replace 192.168.30.1 with your Gateway_address.
  5. sudo ip route add 192.168.4.0/24 via 192.168.30.1. Again, replace 192.168.30.1 with your Gateway_address, and replace 192.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)