A particular network for ProxMOX WAN USB-TCP-IP-4G and LAN

ninoo

New Member
Jan 5, 2020
3
0
1
43
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
 
Hi @spirit, yes I was wrong writing it in Italian.
I used a different technique, but I always have problems. Could you help me?

I have a complex network created in the following way:
1)Modem 4g usb
2)PC with Proxmox with VM with IPFIRE
3)Switch L3 with VLAN


ProxMox(PC) is two network(The address of proxmox is https://192.168.1.2:8006)
  1. NETWORK1 192.168.1.2/24 gateway 192.168.1.1 (Use Linux Bridge)
  2. NETWORK2 192.168.0.2/24 (Use Linux Bridge)

Ipfire
  1. LAN 192.168.1.1 (GREEN)
  2. WAN 192.168.0.3/24 DNS 8.8.8.8 8.8.4.4 Gateway 192.168.0.1 (RED)
    Network–>Static Routes Host 192.168.2.0/24 Gateway 192.168.1.3
    Firewall
    Source 192.168.2.0/24 NAT Souce RED— Destination —ALL —Permited

SWITCH L3

1)VLAN1 192.168.1.0 255.255.255.0
2)VLAN2 192.168.2.0 255.255.255.0
IPV4 Static Routes
Destination IP 0.0.0.0----Next Hop Router IP Adress 192.168.1.1 Metric 4 VLAN1


PC(192.168.1.1)—>SWITCH(192.168.1.3 port 5 LAN1)


The 192.168.1.0 network:
  1. Browse the internet
  2. Accesses IPFIRE on 192.168.1.1
  3. Access ProxMox on 192.168.1.2
  4. In the network all machines ping.

The 192.168.2.0 network:
  1. Browse the internet
  2. Accesses IPFIRE on 192.168.1.1
  3. DOES NOT access ProxMox on 192.168.1.2
  4. In the network the ping to ProxMox does not work.
    Machine 192.168.1.2 does NOT seem to exist !!!

How can I solve it? I from any machine on the 192.168.2.0 network would also like to reach proxmox via https://192.168.1.2:8006. Can you help me? Please
Thanks bye
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!