Last active
October 14, 2025 22:39
-
-
Save ottosch/82af69d960f655d767e49497cc59d3bb to your computer and use it in GitHub Desktop.
Sample /etc/network/interfaces with static IP for proxmox VM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Notes: | |
# remove the first line (source) if interfaces.d does not exist. | |
# interface_name examples: eth0, ens18 etc | |
# chosen_ip example: 192.168.1.18 etc | |
# This works for VMs. For LXC, it has to be done within proxmox itself. | |
# On UI: node > CT > network. Enter IP there with a trailing "/24". | |
source /etc/network/interfaces.d/* | |
# The loopback network interface | |
auto lo | |
iface lo inet loopback | |
# The primary network interface (static) | |
allow-hotplug <interface_name> | |
auto <interface_name> | |
iface <interface_name> inet static | |
address <chosen_ip> | |
netmask 255.255.255.0 | |
gateway 192.168.1.1 | |
dns-nameservers 1.1.1.1 9.9.9.9 8.8.8.8 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment