I was trying to add a new client to the VPN but after I restarted the OpenVPN server, neither the new or the previous clients are connecting.
I have cleaned the PIds but to no effect.
Eventhough I am useing FreeBSD, I am still quite new to networking etc, I think I broke my hosts file while trying to make it look clean and pretty what do you think?
Here are the configs for the three machines. Pls note the webserver and database are jailed servers.
OpenVPN Server
/etc/hosts
Code: Select all
::1 localhost
127.0.0.1 localhost
203.x.x.212 host host.isp.com
203.x.x.213 webserver mydomain.com
203.x.x.214 database
192.168.254.1 host
192.168.254.2 webserver
192.168.254.7 database
Code: Select all
local 203.x.x.212
port 3000
dev tap
ca /usr/local/etc/openvpn/keys/ca.crt
cert /usr/local/etc/openvpn/keys/server.crt
key /usr/local/etc/openvpn/keys/server.key # This file should be kept secret
dh /usr/local/etc/openvpn/keys/dh1024.pem
server 192.168.254.0 255.255.255.0
ifconfig-pool-persist ipp.txt
client-config-dir /usr/local/etc/openvpn/ccd
route 192.168.254.0 255.255.255.0
client-to-client
keepalive 10 120
comp-lzo
max-clients 10
user root
persist-key
persist-tun
status /var/log/openvpn-status.log
log-append /var/log/openvpn.log
verb 3
Code: Select all
webserver,192.168.254.2
database,192.168.254.7
Code: Select all
ifconfig-push 192.168.254.2
Code: Select all
ifconfig-push 192.168.254.7
Code: Select all
openvpn_enable="YES"
openvpn_configfile="/usr/local/etc/openvpn/server.conf"
openvpn_if="tap"
# Jail Settings
jail_webserver_ip_multi0="tap0|192.168.254.2 mtu 1500 netmask 255.255.255.255"
jail_database_ip_multi0="tap0|192.168.254.7 mtu 1500 netmask 255.255.255.255"
#/etc/hosts
Code: Select all
::1 localhost
127.0.0.1 localhost
203.x.x.212 host host.isp.com
203.x.x.213 webserver mydomain.com
203.x.x.214 database
Code: Select all
client
dev tap
proto udp
remote 203.x.x.212 2501
resolv-retry infinite
nobind
persist-key
persist-tun
ca /usr/local/etc/openvpn/keys/ca.crt
cert /usr/local/etc/openvpn/keys/database.crt
key /usr/local/etc/openvpn/keys/database.key
ns-cert-type server
comp-lzo
verb 3
mute 20
status /var/log/openvpn-status.log
log-append /var/log/openvpn.log
Code: Select all
openvpn_enable="YES"
openvpn_configfile="/usr/local/etc/openvpn/client.conf"
openvpn_if="tap"
#/var/log/openvpn.log
Code: Select all
3:32:00 2011 SIGUSR1[soft,tls-error] received, process restarting
3:32:00 2011 Restart pause, 2 second(s)
3:32:02 2011 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
3:32:02 2011 Re-using SSL/TLS context
3:32:02 2011 LZO compression initialized
3:32:02 2011 Control Channel MTU parms [ L:1574 D:138 EF:38 EB:0 ET:0 EL:0 ]
3:32:02 2011 Data Channel MTU parms [ L:1574 D:1450 EF:42 EB:135 ET:32 EL:0 AF:3/1 ]
3:32:02 2011 Local Options hash (VER=V4): 'd79ca330'
3:32:02 2011 Expected Remote Options hash (VER=V4): 'f7df56b8'
3:32:02 2011 Socket Buffers: R=[42080->65536] S=[9216->65536]
3:32:02 2011 UDPv4 link local: [undef]
3:32:02 2011 UDPv4 link remote: 203.x.x.212:2501
Webserver
#/etc/hosts
Code: Select all
::1 localhost
127.0.0.1 localhost
203.x.x.212 host host.isp.com
203.x.x.213 webserver mydomain.com
203.x.x.214 database
Code: Select all
client
dev tap
proto udp
remote 203.x.x.212 3000
resolv-retry infinite
nobind
persist-key
persist-tun
ca /usr/local/etc/openvpn/keys/ca.crt
cert /usr/local/etc/openvpn/keys/webserver.crt
key /usr/local/etc/openvpn/keys/webserver.key
ns-cert-type server
comp-lzo
verb 3
mute 20
status /var/log/openvpn-status.log
log-append /var/log/openvpn.log
Code: Select all
openvpn_enable="YES"
openvpn_configfile="/usr/local/etc/openvpn/client.conf"
openvpn_if="tap"
#/var/log/openvpn.log
Code: Select all
Tue Jul 26 13:34:55 2011 SIGUSR1[soft,tls-error] received, process restarting
Tue Jul 26 13:34:55 2011 Restart pause, 2 second(s)
Tue Jul 26 13:34:57 2011 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or
Tue Jul 26 13:34:57 2011 Re-using SSL/TLS context
Tue Jul 26 13:34:57 2011 LZO compression initialized
Tue Jul 26 13:34:57 2011 Control Channel MTU parms [ L:1574 D:138 EF:38 EB:0 ET:0 EL:0 ]
Tue Jul 26 13:34:57 2011 Data Channel MTU parms [ L:1574 D:1450 EF:42 EB:135 ET:32 EL:0 AF:3/1 ]
Tue Jul 26 13:34:57 2011 Local Options hash (VER=V4): 'd79ca330'
Tue Jul 26 13:34:57 2011 Expected Remote Options hash (VER=V4): 'f7df56b8'
Tue Jul 26 13:34:57 2011 Socket Buffers: R=[42080->65536] S=[9216->65536]
Tue Jul 26 13:34:57 2011 UDPv4 link local: [undef]
Tue Jul 26 13:34:57 2011 UDPv4 link remote: 203.x.x.212:3000