i want to set up a static ip for my server because i am trying to run openvpn but i walked into an issue.
When i google how to setup an static ip all the tutorials tell me to add something like this
Code: Select all
allow-hotplug eth0
iface eth0 inet static
address 192.168.1.202
netmask 255.255.255.0
gateway 192.0.1.1
But my problem is there is no ""# The primary network interface" in my /etc/network/interfaces.
To clarify: acording to the tutorials my /etc/network/interfaces is supposed to look like
Code: Select all
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp
so when its static it looks like
Code: Select all
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 192.168.1.202
netmask 255.255.255.0
gateway 192.0.1.1
But my /etc/network/interfaces looks like this:
Code: Select all
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback