New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Comments
not sure if i got you exactly but in general you can do this through setting to forward table
i am assuming your pptp interface is tun0
you can do this
iptables -I FORWARD 1 -j Drop
iptables -I FORWARD 1 -i eth0 -o tun0 -j ACCEPT
iptables -I FORWARD 1 -i tun0 -o eth0 -j ACCEPT
those will be added to the beginning of your forward table
it means only accept tun0 <---> eth0 forwarding and drop everything else
hope thats what you are looking for
Thanks, but this is not exactly what I am looking for.
I am having two internet interface both connected to internet. I want to make all pptpd outgoing connections to go through eth0 only.
Hope that is clear now.
You're sure? What @Hani wrote does pretty much what you asked for in my opinion.
Any more accurate solutions would need some more information about your setup...
If there is more than one service using the tun interface you can also do the forwarding dependent on the port.
can you show the ifconfig output of your vm ?
also how did you setup the pptp ?
Thanks
Thanks a lot. I did not notice it. Sorry anyway.
Another thing. Can I specify all dns inquires to 8.8.8.8 to be sent through eth0 only? In general all data going from server it must be send from eth0 not from any other interface in the server.
Thanks again
Of course you can! Set up an iptables rule that redirects all DNS queries (--dport 53, and UDP) through eth0 as outgoing interface. If only the ones made to 8.8.8.8 should take the way out through eth0 than refine your rule with an according destination (-d).