Re: masquerading with other address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Also,

Learn about the "src" parameter to the "ip route add" command.

  http://linux-ip.net/gl/ip-cref/node155.html
  http://linux-ip.net/html/routing-saddr-selection.html

If you are using ipchains MASQ (yeah, ipchains is still around), you can
use a the "src" parameter to cause the kernel to select a particular IP
for packets which are to be masqueraded.

  ipchains -I forward -s $INTERNAL_NET -d $DEST_NET -j MASQ

  ip route add $DEST_NET via $GATEWAY_IP src $PREFERRED

Good luck,

-Martin

 :     Read about netfilter SNAT.
 :     iptables -t nat -A POSTROUTING -s 192.168.10.X/XX -j SNAT --to
 : "ip-address-of-ppp0"
 :     Correct list for this question is netfilter-user.
 : -- Sumit
 :
 : ----- Original Message -----
 : From: "Andrei Loukinykh" <avl@seavenue.net>
 : >  Is it at all possible to masquerade localnet under other
 : > interface's address ( not that interface, which is default route).
 : >  I have one localnet(192.168.10...) , one eth0 - 195.6.3.x and ppp0, which
 : > is my default route, have another real address - 195.6.3.y. All clients on
 : > the localnet are now masqueraded as they go from .y (ppp0). But I want
 : > them to be masqueraded as .x(eth0).
 :
 : -
 : : send the line "unsubscribe linux-net" in
 : the body of a message to majordomo@vger.kernel.org
 : More majordomo info at  http://vger.kernel.org/majordomo-info.html
 :

-- 
Martin A. Brown --- SecurePipe, Inc. --- mabrown@securepipe.com

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux