Someone on the #openvz channel on Freenode suggested exactly the same, with a something more :<div>On CT101 :</div><div>ip route add 91.121.177.54 dev eth0<br><br></div><div>And now everything's works fine !</div><div>
<br><div class="gmail_quote">On Thu, Apr 15, 2010 at 6:48 PM, Tobias Limmer <span dir="ltr"><<a href="mailto:tobias.limmer@informatik.uni-erlangen.de">tobias.limmer@informatik.uni-erlangen.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Darquandier,<br>
<br>
most probably your problem is the default route on CT101 - it should send the response packets via the VPN. To avoid this problem, you must perform source and destination NAT on CT0, so that source and destination IP of arriving packets are replaced. The corresponding commands would be:<br>
<br>
iptables -t nat -A PREROUTING -d [public-ip-CT0] -p tcp --dport 2222 -j DNAT --to-destination <a href="http://10.0.0.101:22" target="_blank">10.0.0.101:22</a><br>
iptables -t nat -A POSTROUTING -d 10.0.0.101 -p tcp --dport 22 -j SNAT --to-source 10.0.0.1<br>
<br>
Now all TCP connections to [public-ip-CT0] and port 2222 are forwarded to CT101. One drawback: during the process the original IP address is lost and CT101 always assumes that the connections originate from CT0.<br>
This kind of setup is very tricky to get right, tcpdump helps a lot!<br>
<br>
Btw: We've been using Proxmox for about a year now, and it works great! Thanks a lot to the developers!<br>
<br>
bye,<br>
Tobi<div><div></div><div class="h5"><br>
<br>
On 15.04.2010, at 17:32, Darquandier wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5">
Hello everyone, count me in on the proxmox ve ship !<br>
<br>
Still, I'm having some troubles setting up port forwarding to a container,<br>
here is my story :<br>
<br>
I set up a proxmox server with a container inside having a bridged ethernet<br>
and it's own public ip.<br>
Let's call the host server CT0 and the container CT101.<br>
CT0 has a vmbr0 interface with an internet public address (call it<br>
[public-ip-CT0].<br>
CT101 has a bridged interface, called eth0, with it's own public address<br>
([public-ip-CT101]).<br>
CT101 connects to a VPN, and therefore [public-ip-CT101] becomes unreachable<br>
(logical).<br>
On CT0, I created an alias vmbr0:0 with ip 10.0.0.1<br>
On CT101, I created an alias eth0:0 with ip 10.0.0.101<br>
With or withour the vpn, CT0 can now see CT101 and ssh through it, etc.<br>
using this 10.0.0.0 LAN.<br>
Now, I want to redirect some of the incoming traffic arriving on CT0 to<br>
CT101. Maily an ssh port and some other network services, so that CT101<br>
remains fully operatable even when connected to the VPN, and I cannot find<br>
the good iptables command to put on the CT0.<br>
The best I can do is forwarding the port, I see the packets arrive, but no<br>
answer...<br></div></div>
_______________________________________________<br>
pve-user mailing list<br>
<a href="mailto:pve-user@pve.proxmox.com" target="_blank">pve-user@pve.proxmox.com</a><br>
<a href="http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user" target="_blank">http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user</a><br>
</blockquote>
<br>
</blockquote></div><br></div>