Networking Forums

Networking Forums > Computer Networking > Linux Networking > SNAT with multiple mappings: subinterfaces needed?

Reply
Thread Tools Display Modes

SNAT with multiple mappings: subinterfaces needed?

 
 
Joe Drago
Guest
Posts: n/a

 
      06-14-2004, 03:49 PM
The Netfilter NAT HOWTO shows this as an example to source NAT to multiple
source IPs:

iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to 1.2.3.4-1.2.3.6

I've successfully gotten this to work as expected if I use a single "--to"
address, and the Internet interface -uses- that address, but it fails every
time I try to use a multiple SNAT list, and I feel that it is because my
machine is not answering ARP requests for those other IPs. Do I need to add
a subinterface for each IP I want to SNAT to? Or is there a much simpler
command I haven't learned yet?

Thanks in advance.

--
Joe Drago
StreamLine Communications

 
Reply With Quote
 
 
 
 
Joe Drago
Guest
Posts: n/a

 
      06-15-2004, 03:33 PM
Solved my own problem ... I just had to add the IP for each in the list,
such as:

ip addr add 1.2.3.4/24 dev eth0

--
Joe Drago
StreamLine Communications


Joe Drago <(E-Mail Removed)> wrote in
news:Xns950859C224D8Djoedragosl@129.250.35.204:

> The Netfilter NAT HOWTO shows this as an example to source NAT to
> multiple source IPs:
>
> iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to 1.2.3.4-1.2.3.6
>
> I've successfully gotten this to work as expected if I use a single
> "--to" address, and the Internet interface -uses- that address, but it
> fails every time I try to use a multiple SNAT list, and I feel that it
> is because my machine is not answering ARP requests for those other
> IPs. Do I need to add a subinterface for each IP I want to SNAT to? Or
> is there a much simpler command I haven't learned yet?
>
> Thanks in advance.
>


 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Traffic through subinterfaces ppogoda@gmail.com Linux Networking 3 12-13-2007 03:03 PM
ip change on interface with subinterfaces. Pedros Linux Networking 3 12-27-2005 12:59 PM
dhcp for subinterfaces jeroen Linux Networking 1 10-24-2005 10:37 AM
VPN routing from multiple locations needed Bob Network Routers 1 08-13-2005 03:03 AM
IP mappings Eric Linux Networking 1 02-21-2005 12:17 PM



1 2 3 4 5 6 7 8 9 10 11