Hi,
I've an networking issue where some hosts with a NAT'ed public IP cannot reach a couple public networks that have firewalls however we have a site that is permitted and want to extend this. However we do not have control over the firewalls nor will the firewall operators add any other sources.
I've got OpenVPN working and happy with the solution however I have to manually remove and add the NAT rule to iptables every time the tunnel drops.
OpenVPN has the client ccd option 'iroute' which I've used to provide the route to the LAN 192.168.0.0/24 at the other site we want to access the resources (eg:217.10.4.0/24 and 67.32.10.0/24 being example subnets). This works fine after I add 'iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE' but once the OpenVPN client (eg: 123.45.67.1) disconnects and reconnects the rule doesn't work?
Is there a dynamic NAT ccd option that is available to be executed when a client connects to add the nat rule on the OpenVPN server? I've looked through the manual and googled and cannot find it (if it exists which I'm hoping it does).
Problem:
Possible Solution?
Thanks.
Antonio