All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Creating a VPS in Proxmox with assigned ips
Can someone help me set this up? I got a Delimiter dedicated server, and have an IP 12.20.86.60 for the server. I asked and got provisioned 12.20.87.62 and 12.20.87.63 as additional ip addresses (on a different subnet). I would like to create two VPSes with each of the provisioned IPs.
Proxmox kernel is loaded.
In /etc/vz/vz.conf, I have set NEIGHBOUR_DEVS=all
and rebooted.
In Proxmox, I created a container 101, in routed mode and assigned it 12.20.87.62.
Normally this is all that's required to get the container up and running. However I can neither ping to, or ping an ip out of the container thus created.
On the main server, network config:
# cat /etc/network/interfaces auto lo iface lo inet loopback auto vmbr0 iface vmbr0 inet static address 12.20.86.60 netmask 255.255.255.192 network 12.20.86.0 broadcast 12.20.86.63 gateway 12.20.86.62 bridge_ports eth0 bridge_stp off bridge_fd 0 bridge_maxwait 0 auto eth0 iface eth0 inet manual
On the container:
# cat /etc/network/interfaces # Auto generated lo interface auto lo iface lo inet loopback # Auto generated venet0 interface auto venet0 iface venet0 inet manual up ifconfig venet0 up up ifconfig venet0 127.0.0.2 up route add default dev venet0 down route del default dev venet0 down ifconfig venet0 down iface venet0 inet6 manual up route -A inet6 add default dev venet0 down route -A inet6 del default dev venet0 auto venet0:0 iface venet0:0 inet static address 12.20.87.62 netmask 255.255.255.255
How can I set this up in routed mode?
tracing the route:
#traceroute 12.20.87.62 traceroute to 12.20.87.62 (12.20.87.62), 30 hops max, 60 byte packets 1 la-vz1.iniz.com (107.161.164.2) 0.091 ms 0.035 ms 0.025 ms 2 unassigned.psychz.net (104.216.1.49) 0.658 ms 0.613 ms 0.633 ms 3 10.99.99.5 (10.99.99.5) 0.259 ms 0.265 ms 0.244 ms 4 vlan701.br02.lax05.pccwbtn.net (63.218.42.105) 0.974 ms 1.291 ms 1.269 ms 5 TenGE0-0-0-5.cr04.lax04.pccwbtn.net (63.218.50.169) 2.092 ms 2.076 ms 2.286 ms 6 206.111.11.66.ptr.us.xo.net (206.111.11.66) 0.509 ms 0.562 ms 0.519 ms 7 207.88.14.214.ptr.us.xo.net (207.88.14.214) 67.397 ms 67.484 ms 67.448 ms 8 207.88.12.131.ptr.us.xo.net (207.88.12.131) 69.728 ms 69.733 ms 69.776 ms 9 207.88.12.152.ptr.us.xo.net (207.88.12.152) 87.855 ms 66.898 ms 66.893 ms 10 207.88.12.178.ptr.us.xo.net (207.88.12.178) 82.380 ms 82.356 ms 82.331 ms 11 te-3-4-0.rar3.sanjose-ca.us.xo.net (207.88.12.177) 92.073 ms 92.050 ms 92.024 ms 12 ae1d0.cir1.nyc-ny.us.xo.net (207.88.13.49) 66.881 ms 81.556 ms 81.521 ms 13 216.156.108.18.ptr.us.xo.net (216.156.108.18) 69.920 ms 69.920 ms 69.887 ms 14 12.20.86.60 (12.20.86.60) 67.157 ms 67.119 ms 67.030 ms 15 * * * 16 * * *
As you can see, route stops at the main server.
Comments
I believe you need the following iptables rule to route external traffic:
iptables -t nat -A POSTROUTING -s [ip local range] -o eth0 -j SNAT --to [public ip]
e.g.
iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -o eth0 -j SNAT --to 123.33.17.52
@EdgeWeb, I have received two failover ips. Does what you posted still apply?
Try adding a route to their gateway
route add 12.20.86.62 dev venet0
route add 0.0.0.0/0 via 12.20.86.62
Not sure that's the correct command, but essentially you need to tell it the gateway is reachable via venet0 (Because it sits outside the devices subnet) and then you can set a route telling i to use the gateway for all other traffic.
this worked for me on an OVH server in the past
@dragon2611 To be set from within the container?
Yep if it's bridged rather than routed.
is it like OVH where you have to register the NIC's mac with them?
I would like to go with routed mode. Hitherto (in ovh and online.net) I'd just add the failover IPs to Proxmox while creating cts and it would simply work. The traceroute shows that the routing till my dedicated server is setup properly. It simply does not route to the containers. I have next to no knowledge regarding network configuration. Could you explain what to type, and where, whether on the server or within the containers (after doing a
vzctl enter
?Isnt this possible using routed mode?
Rather difficult. Took me several hours to find a working config but this is because I'm new to proxmox. The key was to use 'pointopoint'. I came with the following:
=== delicated (debian 7)===
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 12.20.86.60
netmask 255.255.255.255
pointopoint 12.20.86.62
gateway 12.20.86.62
auto vmbr0
iface vmbr0 inet static
address 12.20.86.60
netmask 255.255.255.255
bridge_ports none
bridge_stp off
bridge_fd 0
bridge_maxwait 0
up ip route add 12.20.86.60/32 dev vmbr0
=== vm (debian 8) ===
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 12.20.87.62
netmask 255.255.255.255
pointopoint 12.20.86.60
gateaway 12.20.86.62
dns-nameservers 8.8.8.8 8.8.4.4
dns-search osange.net
up route add default gw 12.20.86.60 netmask 0.0.0.0 dev eth0
@Joelgm - PM me the config and the assigned IPs.