Hello to all
I'm a new proxmox user. I have a particular network made up of a WAN and a LAN. The peculiarity lies in the fact that the WAN is constituted by a 4G / USB router which creates on the USB cable (enp0s20u3u1) an unmodifiable network with gateway 192.168.0.1.
The LAN is the network outgoing to the PC.
I thought of setting Proxmox as a control network on the LAN (eno1) giving as an IP for proxmox 192.168.1.1 and gateway itself 192.168.1.1
To make the WAN go, the gateway must always be active and therefore create a network 192.168.0.2 with gateway 192.168.0.1.
From the Proxmox GUI I saw that you cannot set up a similar network but only via the console command line.
I have seen that you need to edit the /etc/network/interfaces
I thought of modifying the file in the following way:
auto lo
iface lo inet loopback
iface eno1 inet manual
auto vmbr0
iface vmbr0 inet static
address 192.168.100.2
netmask 255.255.255.0
gateway 192.168.100.1
bridge_ports eno1
bridge_stp off
bridge_fd 0
auto vmbr1
iface vmbr1 inet static
address 192.168.0.2
netmask 255.255.255.0
bridge_port off
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.0.1/24' -o enp0s20u3u1 -j MASCHERAMENTO
pre-down iptables -t nat -D POSTROUTING -s '192.168.0.1/24' -o enp0s20u3u1 -j MASCHERAMENTO
Will this script work? What corrections do you think I should make?
Thanks in advance for your support
I'm a new proxmox user. I have a particular network made up of a WAN and a LAN. The peculiarity lies in the fact that the WAN is constituted by a 4G / USB router which creates on the USB cable (enp0s20u3u1) an unmodifiable network with gateway 192.168.0.1.
The LAN is the network outgoing to the PC.
I thought of setting Proxmox as a control network on the LAN (eno1) giving as an IP for proxmox 192.168.1.1 and gateway itself 192.168.1.1
To make the WAN go, the gateway must always be active and therefore create a network 192.168.0.2 with gateway 192.168.0.1.
From the Proxmox GUI I saw that you cannot set up a similar network but only via the console command line.
I have seen that you need to edit the /etc/network/interfaces
I thought of modifying the file in the following way:
auto lo
iface lo inet loopback
iface eno1 inet manual
auto vmbr0
iface vmbr0 inet static
address 192.168.100.2
netmask 255.255.255.0
gateway 192.168.100.1
bridge_ports eno1
bridge_stp off
bridge_fd 0
auto vmbr1
iface vmbr1 inet static
address 192.168.0.2
netmask 255.255.255.0
bridge_port off
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.0.1/24' -o enp0s20u3u1 -j MASCHERAMENTO
pre-down iptables -t nat -D POSTROUTING -s '192.168.0.1/24' -o enp0s20u3u1 -j MASCHERAMENTO
Will this script work? What corrections do you think I should make?
Thanks in advance for your support