Hello
Warning, I m a beginner
So for my personnal use, I m renting a dedicated server. I installed proxmox on it. My aim was to do a few VM for me and my family. But I m really struggling with the IP part.
To start here are the ip info on the panel of my provider (oneprovider)
IP 195.XXX.171.60 public mac 20:XX:84:BA:84
IP 10.XX.55.135 private mac 20:XX:47:84:ba:86
Netmask: 255.255.255.255
Gateway: 195.XXX.171.1
If I understood right after my reading, I can t do any subnet ip myself
So the solution for me would be to use Masquerading (NAT) with iptables.
the code I made
auto lo
iface lo inet loopback
iface eno1 inet manual
auto vmbr0
iface vmbr0 inet static
address 195.xxx.171.60
netmask 255.255.255.0
gateway 195.xxx.171.1
bridge_ports eno1
bridge_stp off
bridge_fd 0
auto vmbr1
#private sub network
iface vmbr1 inet static
address 192.168.1.1
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 vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.1.0/24' -o vmbr0 -j MASQUERADE
--------------------------------------------------------
than I put 192.168.1.2 to my first vm but i still can t connect to the internet ...
Warning, I m a beginner
So for my personnal use, I m renting a dedicated server. I installed proxmox on it. My aim was to do a few VM for me and my family. But I m really struggling with the IP part.
To start here are the ip info on the panel of my provider (oneprovider)
IP 195.XXX.171.60 public mac 20:XX:84:BA:84
IP 10.XX.55.135 private mac 20:XX:47:84:ba:86
Netmask: 255.255.255.255
Gateway: 195.XXX.171.1
If I understood right after my reading, I can t do any subnet ip myself
So the solution for me would be to use Masquerading (NAT) with iptables.
the code I made
auto lo
iface lo inet loopback
iface eno1 inet manual
auto vmbr0
iface vmbr0 inet static
address 195.xxx.171.60
netmask 255.255.255.0
gateway 195.xxx.171.1
bridge_ports eno1
bridge_stp off
bridge_fd 0
auto vmbr1
#private sub network
iface vmbr1 inet static
address 192.168.1.1
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 vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.1.0/24' -o vmbr0 -j MASQUERADE
--------------------------------------------------------
than I put 192.168.1.2 to my first vm but i still can t connect to the internet ...
Last edited: