Hello,
I have successfully configured my openvpn server on a dd-wrt router. During my research I came across a lot of info and I need some help clarifying a few IP tables nat rules, that way I could determine which one is best suited for me. Using either of the below ip tables nat rules work on my server but I just don’t understand their differences and if I should be using one over the other. Can someone help me out with this please, I just can’t seem to grasp which one I should be using.
iptables -t nat -I PREROUTING -p tcp --dport 443 -j ACCEPT
or
iptables -t nat -A POSTROUTING -s 172.21.132.0/24 -o vlan2 -j SNAT --to-source $(nvram get wan_ipaddr)