Hi,
I've setup oVPN from this guide:
Centos7,
https://www.howtoforge.com/tutorial/how-to-install-openvpn-on-centos-7/
After correcting the dh1024->dh2048, and the iptables rule, the server starts correctly. I have my network firewall with forwarding setup, but still can't connect.
I see the packets coming in:
[root@openvpncn]# tcpdump -i ens32 port 1337
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ens32, link-type EN10MB (Ethernet), capture size 65535 bytes
22:22:16.902830 IP xxxxxx.63091 > openvpncn.xxxxxxx: UDP, length 14
#change with your port
port 1337
#You can use udp or tcp
proto udp
# "dev tun" will create a routed IP tunnel.
dev tun
#Certificate Configuration
#ca certificate
ca /etc/openvpn/keys/ca.crt
#Server Certificate
cert /etc/openvpn/keys/server.crt
#Server Key and keep this is secret
key /etc/openvpn/keys/server.key
#See the size a dh key in /etc/openvpn/keys/
dh /etc/openvpn/keys/dh2048.pem
#Internal IP will get when already connect
server 192.168.200.0 255.255.255.0
#this line will redirect all traffic through our OpenVPN
#push "redirect-gateway def1"
#Provide DNS servers to the client, you can use goolge DNS
push "dhcp-option DNS 10.0.0.5"
#Enable multiple client to connect with same key
duplicate-cn
keepalive 20 60
comp-lzo
persist-key
persist-tun
daemon
#enable log
log-append /var/log/myvpn/openvpn.log
#Log Level
verb 3
client
dev tun
proto udp
#Server IP and Port
remote 200.x.x.x 1337
resolv-retry infinite
nobind
persist-key
persist-tun
mute-replay-warnings
ca ca.crt
cert client.crt
key client.key
ns-cert-type server
comp-lzo
And my client has tried both internal and external IP (server inside the network connect direct to the opvn server (10.x.x.x), and connect to my firewall IP (200.x.x.x).
Nothing in the log:
Mon Feb 6 22:00:04 2017 /usr/sbin/ip route del 192.168.200.0/24
Mon Feb 6 22:00:04 2017 Closing TUN/TAP interface
Mon Feb 6 22:00:04 2017 /usr/sbin/ip addr del dev tun0 local 192.168.200.1 peer 192.168.200.2
Mon Feb 6 22:00:04 2017 SIGTERM[hard,] received, process exiting
Mon Feb 6 22:04:11 2017 OpenVPN 2.3.14 x86_64-redhat-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Dec 7 2016
Mon Feb 6 22:04:11 2017 library versions: OpenSSL 1.0.1e-fips 11 Feb 2013, LZO 2.06
Mon Feb 6 22:04:11 2017 Diffie-Hellman initialized with 2048 bit key
Mon Feb 6 22:04:11 2017 Socket Buffers: R=[212992->212992] S=[212992->212992]
Mon Feb 6 22:04:11 2017 ROUTE_GATEWAY 10.0.0.1/255.255.255.0 IFACE=ens32 HWADDR=xx.xx.xx.xx.xx
Mon Feb 6 22:04:11 2017 TUN/TAP device tun0 opened
Mon Feb 6 22:04:11 2017 TUN/TAP TX queue length set to 100
Mon Feb 6 22:04:11 2017 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Mon Feb 6 22:04:11 2017 /usr/sbin/ip link set dev tun0 up mtu 1500
Mon Feb 6 22:04:11 2017 /usr/sbin/ip addr add dev tun0 local 192.168.200.1 peer 192.168.200.2
Mon Feb 6 22:04:11 2017 /usr/sbin/ip route add 192.168.200.0/24 via 192.168.200.2
Mon Feb 6 22:04:11 2017 UDPv4 link local (bound): [undef]
Mon Feb 6 22:04:11 2017 UDPv4 link remote: [undef]
Mon Feb 6 22:04:11 2017 MULTI: multi_init called, r=256 v=256
Mon Feb 6 22:04:11 2017 IFCONFIG POOL: base=192.168.200.4 size=62, ipv6=0
Mon Feb 6 22:04:11 2017 Initialization Sequence Completed
What should I be checking next?