Shooxtime

New Member
Mar 20, 2022
1
0
1
21
Hello,

I am currently on a project in graduate school and here are my tasks that have been assigned to me:

- To study, propose and configure a Linux server allowing to propose the DHCP/DNS service under a Proxmox VE environment.

- Study, propose and configure a router / firewall / NAT solution using an Open source solution under a Proxmox VE environment. We also need to manage the WAN access temporarily if needed.

LAN : 192.168.1.X / gateway : 192.168.1.252
WAN : DHCP 192.168.0.X / gateway : 192.168.0.254

To do this, I have a tower that acts as a server with two network interfaces:

eno1 ( vmbr1) --> this interface is connected to the LAN and allows me to access the proxmox VE interface (192.168.1.40/24 / gateway: 192.168.1.252) with the help of a computer that is on the same network.

eno2 (vmbr2) --> the second network interface of the server is connected to the WAN DHCP (192.168.0.X/24 / gateway: 192.168.0.254) will allow me to have internet on my Debian VM which is on the LAN

So I started to install my Debian VM and I attached it to vmbr2 and I gave it as IP address : 192.168.1.120 / gateway 192.168.1.252

Following that, I installed pfsense and add the two network interfaces LAN and WAN, I gave him as IP address for the LAN: 192.168.1.252/24 and for the WAN, he got an address by DHCP: 192.168.0.71/24

I can access to the pfsense interface as for the proxmox ve interface --> through the computer on the LAN which is: 192.168.1.X

Now, I need to do a NAT between the WAN and the LAN so that my Debian VM which is on vmbr2 and has as address 192.168.1.120/24 and has as gateway 192.168.1.252.

I really need help, I'm trying to learn how to use and configure pfsense if you need more information to help me it would be a pleasure, so I hope you can help me to be able to do this NAT so I can have Internet on my Debian VM. If you need screen I'm ready to give you this and if there are changes to make because I made mistakes I'm ready to listen to you carefully, hoping to have been clear, thank you in advance for your help.
 
So I started to install my Debian VM and I attached it to vmbr2 and I gave it as IP address : 192.168.1.120 / gateway 192.168.1.252

Following that, I installed pfsense and add the two network interfaces LAN and WAN, I gave him as IP address for the LAN: 192.168.1.252/24 and for the WAN, he got an address by DHCP: 192.168.0.71/24

I can access to the pfsense interface as for the proxmox ve interface --> through the computer on the LAN which is: 192.168.1.X

Now, I need to do a NAT between the WAN and the LAN so that my Debian VM which is on vmbr2 and has as address 192.168.1.120/24 and has as gateway 192.168.1.252.
I don't get why your Debian VM needs to do NAT. Usually your pfsense should do the NAT and routing so your Debian VM just needs to access to the LAN and you set the pfsenses LAN IP as the gateway for your Debian VM.
 
There's an official how-to setup pfSense on Proxmox on the Netgate site
Official Guide

The only thing you would need to watch out for is that your WAN network is 192.168.0.x which would not be allowed in a 'real' network - so for a project/lab setup like this you will need to configure pfSense to enable this - go to <Interfaces - WAN - Reserved Networks> and un-tick 'Blocks traffic from IP addresses that are reserved for private networks per RFC 1918'

So you would end up with pfSense LAN interface being assigned 192.168.1.252 and this would then be the gateway IP for your LAN
Normally, the WAN interface is left on DHCP

pfSense can provide DHCP and DNS for your LAN, so this may be sufficient for your project

What does "We also need to manage the WAN access temporarily if needed." mean?

NAT would not be needed for a Debian to access the internet behind the pfSense firewall. The only time that NAT would be required is if you needed to connect to your Debian VM from the WAN side of the pfSense firewall -i.e if the Debian VM was a webhost or a game server.

Hope this helps
 

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!