Recently, and after successful connection between two machines, I am trying to setup simple firewall rules to the OPENVPN server and then setup firewall rules to a firewall/gateway. The question is very simple, I think. So, for the first case, given the fact that the OPENVPN server is firewall as well I wrote the following:
Code: Select all
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE # for masquerading the outgoing packets
iptables -A INPUT -i tun0 10.8.0.0/24 -j ACCEPT # to accept packets from clients
1) When the server masquerade the packets, will do that so to the virtual source IP address as indicated by the command? And if that is the case, what is the point since virtual IP address is already concealed?
Now, I want to write rules to a different machine, the firewall. ( I show it in tutorials )
Code: Select all
iptables -A FORWARD -i tun0 -s 10.8.0.0/24 -o eth0 -j ACCEPT
I hope this is easy for you!
Kind regards