WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

[Xen-users] NAT with specific ip-address

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-users] NAT with specific ip-address
From: Hendrik Jürgens <speedburner@xxxxxxxxx>
Date: Mon, 03 Apr 2006 14:27:27 +0200
Delivery-date: Mon, 03 Apr 2006 05:28:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mail/News 1.5 (X11/20060401)
Hi,

I'm having a minor problem with my NAT.
My machine has two public ips, which are bound to eth0 and eth0:1.
If I'm using the first iptables rule, everything is working fine, but
the outgoing ip address used is the one of eth0. But I want the address
of eth0:1 to be used as the outgoing ip.


This is working, but wrong outgoing ip.
iptables -t nat -A POSTROUTING -s 10.0.0.2 -o eth0 -j MASQUERADE

NAT doesn't work with this rule.
iptables -t nat -A POSTROUTING -o eth0 -s 10.0.0.2 -j SNAT --to-source
<my_eth0:1_address>


Any suggestions?

-- 
Best regards
Hendrik Juergens

http://www.nnga.info

mailto: hendrik.juergens@xxxxxxxxx
PGP Public Key: http://www.dncornholio.de/pubkey.asc




Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-users] NAT with specific ip-address, Hendrik Jürgens <=