This section describes the procedure for operating using Packetix VPN Client on CentOS7.
Basically all you have to do is run the code part of this article in the CLI.
Use yum to install the required packages.
sudo yum groupinstall "development tools"
sudo yum install bzip2-devel gdbm-devel libffi-devel \
libuuid-devel ncurses-devel openssl-devel readline-devel \
sqlite-devel tk-devel wget xz-devel zlib-devel
Packetix VPN Client
Download Packetix VPN from the official website. Use wget.
yum install wget
wget https://github.com/SoftEtherVPN/SoftEtherVPN_Stable/releases/download/v4.32-9731-beta/softether-vpnclient-v4.32-9731-beta-2020.01.01-linux-x64-64bit.tar.gz
tar xfz softether-vpnclient-*-linux-x64-64bit.tar.gz
cd vpnclient
make
#Enter 1 of Yes 3 times
#Move to the original directory
cd ../
#Delete the downloaded one
rm softether-vpnclient-*-linux-x64-64bit.tar.gz
#Directory move
sudo mv vpnclient /usr/local/.
#Change permissions
chmod 600 /usr/local/vpnclient/*
chmod 700 /usr/local/vpnclient/vpncmd
chmod 700 /usr/local/vpnclient/vpnclient
#Run vpncmd to check health
/usr/local/vpnclient/vpncmd
#Press 3.
#Health check
VPN Tools>check
#End of setting screen
VPN Tools>exit
sudo firewall-cmd --zone=public --add-port=443/tcp --permanent
sudo firewall-cmd --zone=public --add-port=992/tcp --permanent
sudo firewall-cmd --zone=public --add-port=5555/tcp --permanent
sudo firewall-cmd --reload
Start vpnclient to use vpncmd.
sudo /usr/local/vpnclient/vpnclient start
https://www.itcore.jp/tips/softether_client.php Service conversion, etc. http://harukarium.sblo.jp/article/184766762.html
Make a NIC card with vpncmd. Also, set the connection destination of vpn. Please correct XXX
as appropriate.
#Create Nic
sudo /usr/local/vpnclient/vpncmd /client localhost /cmd NicCreate vpns
#SERVER settings
sudo /usr/local/vpnclient/vpncmd /client localhost /cmd AccountCreate vpn_th /SERVER:XXX.XXX.XXX.XXX:XXXX /HUB:VPN-Hub /USERNAME:user_name /NICNAME:vpns
#Enter the password to connect to the SERVER
sudo /usr/local/vpnclient/vpncmd /client localhost /cmd AccountPasswordSet vpn_th /TYPE:standard
https://qiita.com/Daisuke-Otaka/items/b9d99c9dcbb84cf813d7
http://mzgkworks.com/post/linux-centos7-network-setting/
Do the following to create a file for your network adapter:
#Stop vpnclient once
#The file naming convention is/etc/sysconfig/network-scripts/ifcfg-vpn_Name you set
# NM_CONTROLLED=Error if not set to "no"
# http://frym.jp/?p=1377
sudo cat << '_EOT_' | sudo tee /etc/sysconfig/network-scripts/ifcfg-vpn_vpns
BOOTPROTO=none
PEERDNS=no
DEVICE=vpn_vpns
ONBOOT=yes
USERCTL=no
NM_CONTROLLED=no
IPADDR=192.168.XXX.XXX
NETMASK=255.255.255.0
_EOT_
#Network restart
sudo systemctl restart network
#View status
sudo systemctl status network
#Device down
# sudo ifdown vpn_vpns
#Device up
# sudo ifup vpn_vpns
#Check network log
sudo journalctl -xe
Service start and stop of vpnclient.
sudo cat << '_EOT_' | sudo tee /etc/systemd/system/vpnclient.service
[Unit]
Description=SoftEther VPN Server
Before=network.target
[Service]
Type=forking
ExecStart=/usr/local/vpnclient/vpnclient start
ExecStop=/usr/local/vpnclient/vpnclient stop
_EOT_
sudo systemctl start vpnclient
sudo systemctl enable vpnclient
sudo systemctl status vpnclient
#Network restart
sudo systemctl restart network
#Launch client(Manual)
# sudo /usr/local/vpnclient/vpnclient start
#vpn connection
sudo /usr/local/vpnclient/vpncmd /client localhost /cmd AccountConnect vpn_th
#View devices that are working or booting
sudo nmcli device show vpn_vpns
#Check with the connected Ping
ping 192.168.XXX.XXX
#Disconnect
sudo /usr/local/vpnclient/vpncmd /client localhost /cmd AccountDisconnect vpn_th
#Stop(Manual)
# sudo /usr/local/vpnclient/vpnclient stop
Recommended Posts