Situation: A VPS already serving web pages via nginx. Now I am adding OpenVPN for roaming devices to this VPS.
One installation for the VPN guide suggests adding this MASQUERADE rule -
iptables -A POSTROUTING -s 10.8.0.0/8 -o eth0 -j MASQUERADE
where 10.8.0.0/8 is the VPN virtual address.
Yet browsing around I see many examples of this more general rule -
iptables -A POSTROUTING -o eth0 -j MASQUERADE
with no condition on the source address.
If there are no bad side effects, I would prefer to use the more general rule, then I wouldn't have to worry about it when changing VPN configurations.
I understand the principle of "better safe than sorry", but is there really anything to worry about?