Hi folks,
In spite of the excellent documentation available, I don't seem to be able to configure OpenVPN correctly, but it seems to work a little bit. By "work a little bit" I mean that I get an error when starting OpenVPN on the server
[root@CentOS openvpn]# service openvpn restart
Shutting down openvpn: [ OK ]
Starting openvpn: [FAILED]
Looking at openvpn.log, and snipping out what appears to be the source of the failure message,
Mon Dec 7 12:23:04 2009 us=110039 TCP/UDP: Socket bind failed on local address [undef]:1194: Address already in use
Mon Dec 7 12:23:04 2009 us=110057 Exiting
but, my client seems to be happy connecting (I get the yellow then green screens in the OpenVPN GUI, and a "connected" message). Furthermore, I can get access to the disk shares on the CentOS server, but I cannot ping or otherwise see any other machines in the CentOS subnet (192.168.52.0).
I'm sure my mistake is blindingly simple, but I just can't find it.
SERVER: CentOS 5.3, running OpenVPN 2.0.9
** server.config
port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key # This file should be kept secret
dh dh1024.pem
server 192.168.54.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "route 192.168.52.0 255.255.255.0"
client-to-client
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
log openvpn.log
verb 6
mute 20
CLIENT: Windoze XP-SP2, running OpenVPN 2.1_rc22
** client.ovpn
client
remote-cert-tls server
proto udp
dev tun
dev-node VPN-Tap
remote xx.yy.zz.aaa 1194
resolv-retry infinite
nobind
persist-key
persist-tun
float
ca ca.crt
cert client.crt
key client.key
comp-lzo
verb 4
The CentOS server (and OpenVPN server) reside in my home subnet behind a firewall that port-forwards port 1194 traffic to the CentOS server. My objective is to use OpenVPN to get access to my entire home subnet - all computers and printers. At minimum, I want access to disk shares, but if I could run XP's remote desktop, that would be ideal.
I have disabled the CentOS firewall (via the administrative GUI), and attempted to configure iptables using the commands:
# Allow TUN interface connections to OpenVPN server
iptables -A INPUT -i tun+ -j ACCEPT
# Allow TUN interface connections to be forwarded through other interfaces
iptables -A FORWARD -i tun+ -j ACCEPT
# Allow TAP interface connections to OpenVPN server
iptables -A INPUT -i tap+ -j ACCEPT
# Allow TAP interface connections to be forwarded through other interfaces
iptables -A FORWARD -i tap+ -j ACCEPT
As I said, this seems pretty simple and straightforward, but I can't even ping other machines through the tunnel. Can anyone help?
Q1: What is the "socket bind failed" error about, and how do I eliminate it?
Q2: How can I use the tunnel to get access to disk shares on other machines (besides the CentOS server)?
Q3: Is there a way to run Remote Desktop over an OpenVPN tunnel?
Thanks in advance!