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-devel

Re: [Xen-devel] NAT through Dom0 on unstable branch

On Tue, 2005-06-21 at 21:15 +0200, Toens Bueker wrote:
> Eitan Isaacson <ee.jay.eye@xxxxxxxxx> wrote:
> > sysctl -w net.ipv4.ip_forward=1  # (if not allready done by xend)
> > iptables -t nat -A POSTROUTING -j MASQUERADE \
> >   -o eth0 -s 192.168.0.1/24
> 
> An alternative solution would be:
> 
> iptables -t nat -F POSTROUTING
> iptables -t nat -F PREROUTING
> iptables -t nat -A POSTROUTING -o eth0 -s 192.168.2.0/24 -j SNAT \ 
>          --to-source <your.public.ip.address>

Yes.  Unless the IP address of eth0 is dynamic, the latter form is
preferable.

Cheers,
Rusty.
-- 
A bad analogy is like a leaky screwdriver -- Richard Braakman


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel