Results 1 to 2 of 2
Hi and sorry for double post, I'm trying to configure iptables to route all traffic for my pptpd vpn connection via a certain netlink ( eth0:8 ) to have a ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-08-2009 #1
- Join Date
- Sep 2009
Iptables VPN advice required
I'm trying to configure iptables to route all traffic for my pptpd vpn connection via a certain netlink ( eth0:8 ) to have a specific single outgoing IP address and to use the vpn's dns servers.
I have this line which somehow works, but it's routing through the first system IP
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Also Squid is configured to use several outgoing IP addresses, but it always goes out with the first system IP once the above iptables line is active
The pppd link when the connection is established (IP range 10.5.1.100-10.5.1.105):
Link encap:Point-to-Point Protocol
inet addr:10.5.1.3 P-t-P:10.5.1.100 Mask:255.255.255.255
The outgoing link I'd like to use for vpn
Link encap:Ethernet HWaddr 00:24:8c:a6:5a:8d
inet addr:220.127.116.11 Bcast:18.104.22.168 Mask:255.255.255.0
Thanks for any suggestions
- 09-08-2009 #2
IPTABLES does not do sub-interfaces which eth0:8 is. Everything will get the ip address of eth0.
If you want a range to get an ip address then you are going to have to setup SNAT and DNAT.
Information on doing this can be found HERE.
The adventure of a life time.
Linux User #296285