Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 1399  / 3 Years ago, sat, june 19, 2021, 6:30:01

I'm using Ubuntu Server and trying to set my connection to have a static IP, instead of a dynamic one. However, whenever I enter this into
/etc/network/interface



auto wlan0
iface wlan0 inet static
address 192.168.1.68
netmask 255.255.255.0
gateway 192.168.1.64


My server can't connect to the internet. Running something like sudo apt-get upgrade, gives errors because I'm not connected to the internet. What's wrong with this?


More From » server

 Answers
2

As far as from 12.04LTS one should not use /etc/resolv.conf. If a network adapter is working with IP addresses, but doesn't resolve domain names, add



dns-nameservers 1.2.3.4  5.6.7.8


after gateway clause in /etc/network/interface


[#37152] Sunday, June 20, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
corsee

Total Points: 479
Total Questions: 122
Total Answers: 106

Location: Barbados
Member since Sat, May 9, 2020
4 Years ago
;