NAT/IPTables question with pptpd
Chris Boyd <[email protected]> Thu, 25 Apr 2013 11:54:10 -0500
| Newsgroups | gmane.network.poptop |
|---|---|
| Message-ID | <[email protected]> |
Hello, I've successfully installed pptpd on an Ubuntu 12.10 server, and configured it to do what I need -- temporary convenient access to a remote network by NAT'ing the PPTP IP addresses to the internal LAN. I'd also like to be able to access the global Internet via NAT to the PPTP server's public IP address. Here's the config: eth0 - Public IP address eth1 - Private IP address 10.10.10.208/24 pptpd.conf is using 172.29.249.0/24 I can successfully NAT to either the server's public address on eth0 with iptables -t nat -A POSTROUTING -s 172.29.249.0/24 -o eth0 -j MASQUERADE Or the eth1 address with iptables -t nat -A POSTROUTING -s 172.29.249.0/24 -o eth1 -j MASQUERADE I just can't seem to find the iptables config that implements this sort of logic: If the destination address is 10.10.10.0/24 then NAT to eth1 IP address else NAT to eth0 IP address I'm continuing to comb through the iptables man page in the mean time. Another alternative might be to send the client a route to 10.10.10.0/24, but the config files don't seem to hint at that being possible. Thanks for the hints, --Chris ------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr