Portal Home > Knowledgebase > Articles Database > proxmox 4.1 for vps hosting
proxmox 4.1 for vps hosting
Posted by zustudios, 01-31-2016, 04:18 PM |
Does anyone know how to setup proxmox 4.1 to offer vps hosting beginning to end? I'm new to proxmox 4.1 and I'm trying to find out how to setup my first vps with ispconfig 3. I have a container with ispconfig 3 installed but I don't know how to open it up to the outside world. I have only one public ip and one nic. Please help.
|
Posted by SkunkEyes, 01-31-2016, 04:40 PM |
What do you need to know? Its pretty straight forward, Just ask, we can guide, and welcome to WHT!
If you only have one Public IP, then your looking at NAT, bridges or bonds... with a masquerade:
https://pve.proxmox.com/wiki/Network_Model
https://raymii.org/s/tutorials/Proxm...Public_IP.html
https://www.ameir.net/blog/archives/...comment-page-1
https://servernetworktech.com/2012/1...rtual-machine/
http://serverfault.com/questions/532...-work-kvms-don
Hope this Helps...
Last edited by SkunkEyes; 01-31-2016 at 04:44 PM.
|
Posted by zustudios, 01-31-2016, 05:07 PM |
Thanks for the welcome. Where I need help is... setting up my /etc/network/interfaces . I have a container with ispconfig 3 installed but no one can reach it from the outside world. I have paid services to be installed on my ispconfig 3 but no one can ssh into my host or my container only me. They are waiting on me so they can install the services. I don't know what to put for eth0 or vmbr0 so they can connect to it. All I have at this point is private ips on my /etc/network/interfaces .What do I need to put there so it is accessible from the outside world? Where do I put my public ip and what are the other settings I should use for both my host and my container? If my questions are not clear enough please tell me. And thank you.
Looking at the tutorials: whats the differences between 192.168.X.X and 10.10.10.X? I have 192.168.... should I use that or 10.10... or both?
Last edited by zustudios; 01-31-2016 at 05:19 PM.
|
Posted by SkunkEyes, 01-31-2016, 05:21 PM |
ok, How many public IPs do you have?
On the Proxmox server, use one public.
On the container, use the console in proxmox, and goto /etc/network/interfaces and assign another "Public" ip to the virtual server in its OWN /etc/network/interfaces
Then restart the interface on the VM, and it should connect, assuming its the same network, or if you chose NAT.
Proxmox box:
auto lo
iface lo inet loopback
iface eth0 inet manual
auto vmbr0
iface vmbr0 inet static
address 192.168.10.2<---public
netmask 255.255.255.0<---/24
gateway 192.168.10.1
bridge_ports eth0
bridge_stp off
bridge_fd 0
VM, IDK if its CentOS or what:
Examples: https://www.linode.com/docs/networki...-configuration
Remember, your dealing with the concept of 2 independent machines( ones just virtualized)
|
Posted by zustudios, 01-31-2016, 05:26 PM |
The container is debian 7.
|
Posted by SkunkEyes, 01-31-2016, 05:36 PM |
ok, so, you need to use your hosting providers public ip, for the proxmox box, then if they gave you more than one, using the console on the top right (preferably noVNC), login to the VM, goto, /etc/network/interfaces and assign either another Public IP, or the NAT IP.
https://i.ytimg.com/vi/U9QXf3tXJ0M/maxresdefault.jpg
if your using NAT, you need to configure the Proxmox box, as I linked earlier to configure it to "foward" to the NAT addresses such as one you choose:
https://en.wikipedia.org/wiki/Private_network
Container/VM ------------ Proxmox Server -------------- Public Internet
10.21.21.5 ------------ 10.21.21.5 ---NAT to 1.2.3.4 --- 1.2.3.4
Make sense?
|
Posted by zustudios, 01-31-2016, 05:48 PM |
it's starting to make sense. I was confused.This is my current /etc/network/interfaces (proxmox). I know it's wrong. Just take a look and tell me what it should be.
# network interface settings; autogenerated
# Please do NOT modify this file directly, unless you know what
# you're doing.
#
# If you want to manage part of the network configuration manually,
# please utilize the 'source' or 'source-directory' directives to do
# so.
# PVE will preserve these directives, but will NOT its network
# configuration from sourced files, so do not attempt to move any of
# the PVE managed interfaces into external files!
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
auto eth0
iface eth0 inet static
address XX.XXX.XXX.XX (public ip)
netmask 255.255.255.0
gateway 192.168.1.1
broadcast 192.168.1.255
network 192.168.1.0
auto vmbr0
iface vmbr0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
broadcast 192.168.1.255
network 192.168.1.0
bridge_ports eth0
bridge_stp off
bridge_fd 0
auto vmbr1
iface vmbr1 inet static
address 192.168.1.100
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '192.168.1.0/24' -o eth0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.1.0/24' -o eth0 -j MASQUERADE
|
Posted by SkunkEyes, 01-31-2016, 05:58 PM |
Assuming the gateway is for the public:
auto eth0
iface eth0 inet static
address XX.XXX.XXX.XX (public ip)
netmask 255.255.255.0
gateway 192.168.1.1<--------------assuming this is correct for a public IP, this needs to be the Public information gateway, same for the netmask /24, /29 etc..
broadcast 192.168.1.255
network 192.168.1.0
Below you have 2 bridges:
vmbr0 and vmbr1, you only need one, unless you plan on another network, but vmbr0 needs to have its details, in the ACtual VM, network file/check your GUI for the network interface card, and see what you assigned to the VM. *NOte, they both have the same IP of .100
auto vmbr0
iface vmbr0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
broadcast 192.168.1.255
network 192.168.1.0
bridge_ports eth0
bridge_stp off
bridge_fd 0
auto vmbr1
iface vmbr1 inet static
address 192.168.1.100
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0
|
Posted by zustudios, 01-31-2016, 06:11 PM |
How can I be sure what my public gateway is? Could it be different then 192.168.1.1 ? As for vmbr1 I was trying to setup pfsense as a vm with one nic.(unsed at this time). I will assign it a different ip.
|
Posted by SkunkEyes, 01-31-2016, 06:16 PM |
I also noticed you left:
vmbr1 as bridge_ports none, it needs to be told to use, eth0.
bridge_ports eth0
<>
Last edited by Postbox; 01-31-2016 at 10:19 PM.
|
Add to Favourites Print this Article
Also Read