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 ...
- 09-08-2009 #1Just Joined!
- Join Date
- Sep 2009
- Posts
- 2
Iptables VPN advice required
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 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):
ppp0
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
eth0:8
Link encap:Ethernet HWaddr 00:24:8c:a6:5a:8d
inet addr:123.123.123.123 Bcast:234.234.234.234 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.


Reply With Quote
