I have OpenVPN and PPTP installed on a VPS. I'm having a few questions that I can't seem to get a firm answer on.
I want to install OpenVPN on 22.214.171.124 (eth0, public IP address) and PPTP on 126.96.36.199 (eth0:1, public IP address). I was able to achieve this with SNAT. However, from all the tutorials I've been reading it recommends forwarding ppp+ to eth0 and vice versa and the same situation for the tun interface.
iptables -A FORWARD -i tun0 -o eth0 -j ACCEPT iptables -A FORWARD -i eth0 -o tun0 -j ACCEPT iptables -A FORWARD -i ppp+ -o eth0 -j ACCEPT iptables -A FORWARD -i eth0 -o ppp+ -j ACCEPT
My setup is CentOS, dedicated server.
For some reason I'm assuming iptables will route all traffic from eth0 to tun0 and stop at that.
My question is,
1) Will these forward rules conflict with each other? 2) Will I need to forward the ppp+ to eth0:1 instead to avoid confliction? Is it even possible? I haven't figured out a way yet. 3) Is iptables smart enough to route traffic that is specific to tun and ppp through these rules?