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

[Xen-users] Networking Help - Routed Configuration with NAT - How to get Dom0 to NAT its own connections


After loads of trial and error, I have managed to get a pretty workable network 
configuration set up:

The server is allocated public ips in xxx.xxx.xxx.192/29. Dom0 is bound to 

Xend is configured to use the default network-route and vif-route scripts.

DomU is to be mail server responding on IP xxx.xxx.xxx.198

DomU network configuration is vif = [ 'ip=' ]

Set up NAT:
iptables -t nat -A POSTROUTING -o eth0 -j SNAT -s --to 
iptables -t nat -A PREROUTING -i eth0 --dport 25 -j DNAT -d xxx.xxx.xxx.198 

At this stage everything works great, Except for one thing:

When Dom0 tries to send mail to the DomU - i.e. connecting to 
xxx.xxx.xxx.198:25 from Dom0, it tries to connect to itself - not DomU!

So in essence it is not NATing its own connections. I figured it is because it 
is configured to listen to xxx.xxx.xxx.198 (thus skipping iptables?) - so I 
unbound it from xxx.xxx.xxx.198 and then it seemed to work fine - for a while - 
until I think the router flushes its ARP cache. So then I started to read up on 
ARP and proxy arp etc... but still am not making much headway.

I would be grateful to anybody able to shed any light / hints on this!


Xen-users mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.