I am trying to create a LAN to LAN VPN using OpenVPN and two RHEL5 machines. I have everything working, except that it fails after I reboot the client side(until I restart iptables).
The relevant openvpn configuration:
dev tun proto tcp-client remote full.host.name 443 ifconfig 192.168.1.14 192.168.1.13 secret static.key route 192.168.1.0 255.255.255.0
The relevant iptables configuration:
-A POSTROUTING -o tun0 -s 192.168.2.53 -d 192.168.1.0/24 -j SNAT --to-source 192.168.1.14
I think it has something to do with iptables coming up before OpenVPN, and not being able to SNAT to an IP that it doesn't have yet. How can I get this to work after a reboot without having to restart iptables?