Need to restart SoftEther VPN interface to have my static IP

Issues related to configuring your network
Post Reply
piellick
Posts: 2
Joined: 2017/11/17 09:46:04

Need to restart SoftEther VPN interface to have my static IP

Post by piellick » 2017/11/17 09:58:42

Hello everyone,

i start my VPN client (softEther) with SystemD a OS startup and i have trouble to assignate a static IP to the local interface of vpn client network interface.

There is my SystemD config file :
-----------------------------------------------------------------------------------------------------------------------------------

Code: Select all


[Unit]
Description=SoftEther VPN Client
After=network.target auditd.service
ConditionPathExists=!/usr/local/vpnclient/vpnclient/do_not_run

[Service]
Type=forking
EnvironmentFile=-/usr/local/vpnclient/vpnclient
ExecStart=/usr/local/vpnclient/vpnclient start
ExecStop=/usr/local/vpnclient/vpnclient stop
KillMode=process
Restart=on-failure

# Hardening
PrivateTmp=yes
ProtectHome=yes
ProtectSystem=full
ReadOnlyDirectories=/
ReadWriteDirectories=-/usr/local/vpnclient/vpnclient
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW CAP_SYS_NICE CAP_SYS_ADMIN CAP_SETUID

[Install]
WantedBy=multi-user.target

-----------------------------------------------------------------------------------------------------------------------------------

When i start the service, local interface appear but without the static IP that i configure.

Code: Select all

vpn_softether: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::2ac:e9ff:fe7e:289e prefixlen 64 scopeid 0x20<link>
ether 00:ac:e9:7e:28:9e txqueuelen 1000 (Ethernet)
RX packets 12 bytes 864 (864.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 20 bytes 1632 (1.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

There is my /etc/sysconfig/network-scripts/ifcfg-vpn_softether :

Code: Select all


DEVICE="vpn_softether"
HWADDR="00:ac:e9:7e:28:9e"
ONBOOT="yes"
BOOTPROTO=static
NM_CONTROLLED="no"
IPADDR="10.38.0.50"
NETMASK="255.255.255.0"


I need to execute an

Code: Select all

 ifdown vpn_softether && ifup vpn_softether
to be able to have my static IP on the interface :

Code: Select all


vpn_softether: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.38.0.50 netmask 255.255.255.0 broadcast 10.38.0.255
inet6 fe80::2ac:e9ff:fe7e:289e prefixlen 64 scopeid 0x20<link>
ether 00:ac:e9:7e:28:9e txqueuelen 1000 (Ethernet)
RX packets 33 bytes 2506 (2.4 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 69 bytes 12308 (12.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0


I will appreciate some tips :)
Last edited by piellick on 2017/11/17 10:09:41, edited 1 time in total.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Need to restart SoftEther VPN interface to have my static IP

Post by TrevorH » 2017/11/17 10:01:16

DEVICE="vpn_centreon" is not vpn_softether. No idea if that would help.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

piellick
Posts: 2
Joined: 2017/11/17 09:46:04

Re: Need to restart SoftEther VPN interface to have my static IP

Post by piellick » 2017/11/17 10:13:23

Hi trevorh, it was a mistake when i write the post. I have the same name everywhere for the interface.

I try to add hotplug directive on ifcfg files but i still need to make "ifdown" and "ifup" command avec starting my VPN.

Code: Select all


DEVICE="vpn_softether"
HWADDR="00:ac:e9:7e:28:9e"
ONBOOT="yes"
HOTPLUG="yes"
BOOTPROTO="static"
NM_CONTROLLED="no"
IPADDR="10.38.0.50"
NETMASK="255.255.255.0"




Post Reply