How to setup NAT on Proxmox

Proxmox uses bridge networking to provide Internet access to virtual machines, but in a bridge networking you need a public IP for each machine. If you have limited IPs you can use NAT to access Internet on your machines. How ever it is preferable to have a static public IP if you are running public services like apache web server. Today we will see how to setup NAT on proxmox to provide private network for virtual machines.

Step 1: Create a bridge

Login to your proxmox host ssh, and run:

This is your network configuration file for proxmox, you might see one bridged interface already configured (bridged to your physical interface), paste following at the end of your configuration file

  • vmbr2 : This is the bridge name for NAT.
  • vmbr1 : This is the interface that was already configured in your network file, adjust the name properly.
  • : This will be the network we are going to use in our internal network, our usable ips in this network will be:
    • If you plan to use different network, you can use this site to get help.
  • bridge_ports none : Bridge ports here is set to none, since we are not connecting to outside world directly.

You have successfully configured a NAT bridge.

Step 2: Bring up the NAT bridge

You can use this command to bring up the bridge you just created:

This will bring up the bridge.

Step 3: Configure Virtual Machine

As a final step configure your virtual machine to use IP address, since DHCP is not present you will have to manually set IP address. Depending upon your OS you can use following details:

  • IP :
  • Gateway :
  • Netmask :

For further virtual machines you can use these ips:

  • ..upto 254

For DNS you can use google DNS


Step 4 : (Optional) Port forwarding to access from outside world

I am assuming you are working with linux guest. We will access ssh of our guest through public IP of main server.

Run this on proxmox host, we are forwarding host port 3033 to guest port 22. (SSH runs on 22)

Then run following to access guest SSH.

It will ask for the password, once provided you will be successfully connected to guest SSH.

11 thoughts on “How to setup NAT on Proxmox

  1. It is not working with Proxmox 5 on fresh install…
    Guest can’t reach host, nor internet.
    Host can’t ping guest IP.
    Any ideas?

  2. It’s a shame they haven’t included NAT in Web UI. What if I want to give someone permissions to create new VMs and expose services to outside world but I don’t want to give this person SSH access to the Proxmox server itself?

  3. Thanks for this tutorial, it works perfect.
    The thing is before i was able to do it completely from the GUI without manual iptables rules but i forgot how. It was after proxmox was changed to LXC.

Leave a comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.