Re: NAT/IPTables question with pptpd
Charlie Brady <[email protected]> Thu, 25 Apr 2013 14:40:05 -0400
| Newsgroups | gmane.network.poptop |
|---|---|
| Message-ID | <CAPvOGzbXs1YPOrMujdXtRy0=E=Wp8WSuH2kiSnPjJd5tHhOFsQ@mail.gmail.com> |
On Thu, Apr 25, 2013 at 12:54 PM, Chris Boyd <[email protected]> wrote: > 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 Isn't that what this does? iptables -t nat -A POSTROUTING -s 172.29.249.0/24 -o eth0 -j MASQUERADE iptables -t nat -A POSTROUTING -s 172.29.249.0/24 -o eth1 -j MASQUERADE The routing table is already making the "If the destination address is 10.10.10.0/24" decision for you. That condition is implicit in the output device. You don't need to make the same decision in iptables. -- This e-mail (including any attachments) is for the sole use of the intended recipient(s) and may contain information that is confidential and/or protected by legal privilege. Any unauthorized review, use, copy, disclosure or distribution of this e-mail is strictly prohibited. If you are not the intended recipient, please notify Mitel immediately and destroy all copies of this e-mail. Mitel does not accept any liability for breach of security, error or virus that may result from the transmission of this message. ------------------------------------------------------------------------------ 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