Hello. I've installed and configured openvpn on my centos 7 vps server but when I try to start the service I got these errors:
/sbin/ip addr add dev tun0 10.8.0.1/24 broadcast 10.8.0.255
Could not determine IPv4/IPv6 protocol. Using AF_INET
Socket Buffers: R=[212992->212992] S=[212992->212992]
TCP/UDP: Socket bind failed on local address [AF_INET][undef]:1194: Address already...(errno=98)
Exiting due to fatal error
Closing TUN/TAP interface
/sbin/ip addr del dev tun0 10.8.0.1/24
openvpn@server.service: main process exited, code=exited, status=1/FAILURE
Unit openvpn@server.service entered failed state.
openvpn@server.service failed.
Here is my server.conf file:
port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key # This file should be kept secret
dh dh2048.pem
topology subnet
remote-cert-eku "TLS Web Client Authentication"
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
keepalive 10 120
;tls-auth ta.key 0 # This file is secret
tls-crypt myvpn.tlsauth
cipher AES-256-CBC
max-clients 100
user nobody
group nobody
persist-key
persist-tun
status openvpn-status.log
verb 3
explicit-exit-notify 1
and here is the result for lsof -i command:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
systemd 1 root 29u IPv6 14615 0t0 TCP *:sunrpc (LISTEN)
systemd 1 root 30u IPv4 14616 0t0 TCP *:sunrpc (LISTEN)
avahi-dae 670 avahi 12u IPv4 16188 0t0 UDP *:mdns
avahi-dae 670 avahi 13u IPv4 16189 0t0 UDP *:59478
chronyd 685 chrony 1u IPv4 16062 0t0 UDP localhost:323
chronyd 685 chrony 2u IPv6 16063 0t0 UDP localhost:323
sshd 1033 root 3u IPv4 18691 0t0 TCP *:ssh (LISTEN)
sshd 1033 root 4u IPv6 18700 0t0 TCP *:ssh (LISTEN)
master 1148 root 13u IPv4 19428 0t0 TCP localhost:smtp (LISTEN)
master 1148 root 14u IPv6 19429 0t0 TCP localhost:smtp (LISTEN)
python 1157 openvpn_as 7u IPv4 19867 0t0 TCP static.213.239.4.46.clients.your-server.de:943 (LISTEN)
python 1157 openvpn_as 9u IPv4 19868 0t0 TCP localhost:904 (LISTEN)
python 1157 openvpn_as 10u IPv4 19869 0t0 TCP localhost:905 (LISTEN)
python 1157 openvpn_as 11u IPv4 19870 0t0 TCP localhost:906 (LISTEN)
python 1157 openvpn_as 13u IPv4 19871 0t0 TCP localhost:907 (LISTEN)
python 1157 openvpn_as 14u IPv4 19872 0t0 TCP localhost:908 (LISTEN)
python 1157 openvpn_as 15u IPv4 19873 0t0 TCP localhost:909 (LISTEN)
openvpn-o 1175 openvpn_as 5u IPv4 20032 0t0 TCP static.213.239.4.46.clients.your-server.de:https (LISTEN)
openvpn-o 1189 openvpn_as 5u IPv4 20114 0t0 UDP static.213.239.4.46.clients.your-server.de:openvpn
sshd 22533 root 3u IPv4 169408 0t0 TCP static.213.239.4.46.clients.your-server.de:ssh->188.166.118.182:51888 (ESTABLISHED)
sshd 27613 root 3u IPv4 253895 0t0 TCP static.213.239.4.46.clients.your-server.de:ssh->188.166.118.182:21987 (ESTABLISHED)
Thank you so much.