Unable to connect to Internet after messing with resolv.conf file

Hi, I have recently issue with resolv.conf when I modified (added dns servers) without original backup. After that I had Issues with connecting to Internet where I MUST compulsory use a vpn to change my IP to even connect to Internet (then I can disable and Internet still works). Also after messing up the dns kept changing automatically (I give 8.8.8.8 , 8.8.4.4 and After boot it reset to 10.1.127.6 so I installed DNScrypt but still I had to run WIndscribe then disconnect at start to connect to Internet).
IDK why but today It took 10 mins to connect to windscirbe (Windscribe is currently busy, please wait…
Still busy, please try again.)
please help.

:+1: Welcome to Manjaro! :+1:

  1. Please read this:
    How to provide good information
    and post some more information so we can see what’s really going on. Now we know the symptom of the disease, but we need some more probing to know where the origin lies…

  2. An inxi --admin --verbosity=7 --filter --no-host --width would be the minimum required information… (Personally Identifiable Information like serial numbers and MAC addresses will be filtered out by the above command)
    Also, please copy-paste that output in-between 3 backticks ``` at the beginning and end of the code/text.

  3. Please read this too:
    [HowTo] make a crash-proof backup for Manjaro

  4. These are the contents of a standard resolv.conf

    search home szYourISPDomainName
    nameserver m.n.o.p #first ISP DNS IP address
    nameserver w.x.y.z #second ISP DNS IP address
    
  5. if you use nano --backup zsFileName, nano will create a backup file automatically.

:+1:

P.S. If you enter a bit more details in your profile, we can also see which Desktop Environment you’re using, which CPU/GPU or Kernel, … you have without typing it every time

1 Like

/etc/resolv.conf is normally managed by NetworkManager
You can add/change the DNS servers that are used from the NetworkManager GUI
You can do all the needed changes from there - instead of editing /etc/resolv.conf directly.

Just take care that you use no spaces - like you may have done (from what you wrote)
Do not do this:

8.8.8.8 , 8.8.4.4

but do this instead:

8.8.8.8,8.8.4.4
  • Open your network Manager
  • Go to tab IPv4
  • Item Method
  • Change:
    • automatic
      to
    • automatic (Only addresses)
  • Enter your DNS server’s IP addresses (Remember: no spaces!)

:+1:

2 Likes

As an alternative to the networkmanager GUI, DNS settings can be changed by creating the file /etc/NetworkManager/conf.d/dns-servers.conf, like this:

[global-dns-domain-*]
servers=::1,8.8.8.8,8.8.4.4

(changes to /etc/resolv.conf are generally temporary as they get overwritten by networkmanager, as Nachlese says)

For more info, read this.

3 Likes
  Kernel: 5.10.23-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.0 
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.10-x86_64 
  root=UUID=8e0a9bd3-8c17-4a6a-bc40-82a92cc72463 ro quiet apparmor=1 
  security=apparmor udev.log_priority=3 
  Desktop: KDE Plasma 5.21.3 tk: Qt 5.15.2 wm: kwin_x11 vt: 1 dm: SDDM 
  Distro: Manjaro Linux base: Arch Linux 
Machine:
  Type: Laptop System: HP product: HP Pavilion Notebook 
  v: Type1ProductConfigId serial: <filter> Chassis: type: 10 serial: <filter> 
  Mobo: HP model: 8216 v: 83.18 serial: <filter> UEFI: Insyde v: F.55 
  date: 07/01/2020 
Battery:
  ID-1: BAT0 charge: N/A condition: N/A volts: 7.9 min: 7.7 
  model: Hewlett-Packard Primary type: Li-ion serial: N/A status: Unknown 
Memory:
  RAM: total: 7.66 GiB used: 3.58 GiB (46.7%) 
  RAM Report: permissions: Unable to run dmidecode. Root privileges required. 
CPU:
  Info: Dual Core model: Intel Core i5-7200U bits: 64 type: MT MCP 
  arch: Amber/Kaby Lake note: check family: 6 model-id: 8E (142) stepping: 9 
  microcode: DE cache: L2: 3 MiB bogomips: 21607 
  Speed: 800 MHz min/max: 400/3100 MHz Core speeds (MHz): 1: 800 2: 798 3: 801 
  4: 800 
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat arch_perfmon art 
  avx avx2 bmi1 bmi2 bts clflush clflushopt cmov constant_tsc cpuid 
  cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm dts epb ept ept_ad erms est 
  f16c flexpriority flush_l1d fma fpu fsgsbase fxsr ht hwp hwp_act_window 
  hwp_epp hwp_notify ibpb ibrs ida intel_pt invpcid invpcid_single lahf_lm lm 
  mca mce md_clear mmx monitor movbe mpx msr mtrr nonstop_tsc nopl nx pae pat 
  pbe pcid pclmulqdq pdcm pdpe1gb pebs pge pln pni popcnt pse pse36 pti pts 
  rdrand rdseed rdtscp rep_good sdbg sep smap smep ss ssbd sse sse2 sse4_1 
  sse4_2 ssse3 stibp syscall tm tm2 tpr_shadow tsc tsc_adjust 
  tsc_deadline_timer vme vmx vnmi vpid x2apic xgetbv1 xsave xsavec xsaveopt 
  xsaves xtopology xtpr 
  Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled 
  Type: l1tf 
  mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable 
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable 
  Type: meltdown mitigation: PTI 
  Type: spec_store_bypass 
  mitigation: Speculative Store Bypass disabled via prctl and seccomp 
  Type: spectre_v1 
  mitigation: usercopy/swapgs barriers and __user pointer sanitization 
  Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, 
  IBRS_FW, STIBP: conditional, RSB filling 
  Type: srbds mitigation: Microcode 
  Type: tsx_async_abort status: Not affected 
Graphics:
  Device-1: Intel HD Graphics 620 vendor: Hewlett-Packard driver: i915 
  v: kernel bus-ID: 00:02.0 chip-ID: 8086:5916 class-ID: 0300 
  Device-2: NVIDIA GM108M [GeForce 940MX] vendor: Hewlett-Packard 
  driver: nvidia v: 460.56 alternate: nouveau,nvidia_drm bus-ID: 01:00.0 
  chip-ID: 10de:134d class-ID: 0302 
  Device-3: Cheng Uei Precision Industry (Foxlink) HP Wide Vision HD 
  integrated webcam 
  type: USB driver: uvcvideo bus-ID: 1-3:2 chip-ID: 05c8:038e class-ID: 0e02 
  serial: <filter> 
  Display: x11 server: X.Org 1.20.10 compositor: kwin_x11 driver: 
  loaded: modesetting display-ID: :0 screens: 1 
  Screen-1: 0 s-res: 1366x768 s-dpi: 96 s-size: 361x203mm (14.2x8.0") 
  s-diag: 414mm (16.3") 
  Monitor-1: eDP-1 res: 1366x768 hz: 60 dpi: 101 size: 344x193mm (13.5x7.6") 
  diag: 394mm (15.5") 
  OpenGL: renderer: Mesa Intel HD Graphics 620 (KBL GT2) v: 4.6 Mesa 20.3.4 
  direct render: Yes 
Audio:
  Device-1: Intel Sunrise Point-LP HD Audio vendor: Hewlett-Packard 
  driver: snd_hda_intel v: kernel alternate: snd_soc_skl bus-ID: 00:1f.3 
  chip-ID: 8086:9d71 class-ID: 0403 
  Sound Server-1: ALSA v: k5.10.23-1-MANJARO running: yes 
  Sound Server-2: JACK v: 0.125.0 running: no 
  Sound Server-3: PulseAudio v: 14.2 running: yes 
  Sound Server-4: PipeWire v: 0.3.23 running: yes 
Network:
  Device-1: Realtek RTL810xE PCI Express Fast Ethernet vendor: Hewlett-Packard 
  driver: r8169 v: kernel port: 3000 bus-ID: 03:00.0 chip-ID: 10ec:8136 
  class-ID: 0200 
  IF: eno1 state: down mac: <filter> 
  Device-2: Intel Dual Band Wireless-AC 3168NGW [Stone Peak] driver: iwlwifi 
  v: kernel port: 3000 bus-ID: 05:00.0 chip-ID: 8086:24fb class-ID: 0280 
  IF: wlo1 state: up mac: <filter> 
  IP v4: <filter> type: dynamic noprefixroute scope: global 
  broadcast: <filter> 
  IF-ID-1: tun0 state: unknown speed: 10 Mbps duplex: full mac: N/A 
  IP v4: <filter> scope: global 
  WAN IP: <filter> 
Bluetooth:
  Device-1: Intel Wireless-AC 3168 Bluetooth type: USB driver: btusb v: 0.8 
  bus-ID: 1-7:3 chip-ID: 8087:0aa7 class-ID: e001 
  Report: This feature requires one of these tools: hciconfig/bt-adapter 
Logical:
  Message: No LVM data was found. 
RAID:
  Message: No RAID data was found. 
Drives:
  Local Storage: total: 931.51 GiB used: 471.79 GiB (50.6%) 
  SMART Message: Unable to run smartctl. Root privileges required. 
  ID-1: /dev/sda maj-min: 8:0 vendor: HGST (Hitachi) model: HTS541010A9E680 
  size: 931.51 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s 
  rotation: 5400 rpm serial: <filter> rev: A7G0 scheme: GPT 
  Optical-1: /dev/sr0 vendor: hp model: DVDRW GUE1N rev: UE00 dev-links: cdrom 
  Features: speed: 24 multisession: yes audio: yes dvd: yes 
  rw: cd-r,cd-rw,dvd-r,dvd-ram state: running 
Partition:
  ID-1: / raw-size: 60.85 GiB size: 59.64 GiB (98.02%) used: 23.51 GiB (39.4%) 
  fs: ext4 dev: /dev/sda6 maj-min: 8:6 label: N/A 
  uuid: 8e0a9bd3-8c17-4a6a-bc40-82a92cc72463 
  ID-2: /boot/efi raw-size: 260 MiB size: 256 MiB (98.46%) 
  used: 82.4 MiB (32.2%) fs: vfat dev: /dev/sda1 maj-min: 8:1 
  label: LOCAL DISK uuid: 6605-7490 
  ID-3: /mnt/Ba raw-size: 243.54 GiB size: 243.54 GiB (100.00%) 
  used: 114.28 GiB (46.9%) fs: ntfs dev: /dev/sda3 maj-min: 8:3 label: N/A 
  uuid: 028098C28098BE1B 
  ID-4: /mnt/Local Disk raw-size: 165.03 GiB size: 165.03 GiB (100.00%) 
  used: 68.91 GiB (41.8%) fs: ntfs dev: /dev/sda5 maj-min: 8:5 
  label: Local Disk uuid: 2810C5C310C597E8 
  ID-5: /mnt/New Volume raw-size: 232.95 GiB size: 232.95 GiB (100.00%) 
  used: 132.81 GiB (57.0%) fs: ntfs dev: /dev/sda10 maj-min: 8:10 
  label: New Volume uuid: 74BEF488BEF443E0 
  ID-6: /mnt/Rakesh raw-size: 214.21 GiB size: 214.21 GiB (100.00%) 
  used: 132.2 GiB (61.7%) fs: ntfs dev: /dev/sda9 maj-min: 8:9 label: Rakesh 
  uuid: CE6E96456E9625ED 
Swap:
  Alert: No Swap data was found. 
Unmounted:
  ID-1: /dev/sda11 maj-min: 8:11 size: 980 MiB fs: ntfs label: N/A 
  uuid: A83A1B163A1AE15C 
  ID-2: /dev/sda12 maj-min: 8:12 size: 13.15 GiB fs: ntfs label: RECOVERY 
  uuid: 126850E76850CADD 
  ID-3: /dev/sda2 maj-min: 8:2 size: 16 MiB fs: <superuser required> 
  label: N/A uuid: N/A 
  ID-4: /dev/sda4 maj-min: 8:4 size: 576 MiB fs: ntfs label: N/A 
  uuid: 04387227387217BE 
USB:
  Hub-1: 1-0:1 info: Full speed (or root) Hub ports: 12 rev: 2.0 
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
  Device-1: 1-3:2 info: Cheng Uei Precision Industry (Foxlink) HP Wide Vision 
  HD integrated webcam 
  type: Video driver: uvcvideo interfaces: 2 rev: 2.0 speed: 480 Mb/s 
  power: 500mA chip-ID: 05c8:038e class-ID: 0e02 serial: <filter> 
  Device-2: 1-7:3 info: Intel Wireless-AC 3168 Bluetooth type: Bluetooth 
  driver: btusb interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 100mA 
  chip-ID: 8087:0aa7 class-ID: e001 
  Hub-2: 2-0:1 info: Full speed (or root) Hub ports: 6 rev: 3.0 speed: 5 Gb/s 
  chip-ID: 1d6b:0003 class-ID: 0900 
Sensors:
  System Temperatures: cpu: 52.0 C mobo: N/A 
  Fan Speeds (RPM): N/A 
Info:
  Processes: 223 Uptime: 31m wakeups: 1 Init: systemd v: 247 tool: systemctl 
  Compilers: gcc: 10.2.0 clang: 11.1.0 Packages: pacman: 1419 lib: 403 
  flatpak: 0 Shell: Bash v: 5.1.0 running-in: konsole inxi: 3.3.03 

my resolv.conf file has:

# Generated by resolvconf
nameserver 10.255.255.3
  1. The inxi looks good from a network perspective

  2. We cannot tell you what to do exactly as we’re not located in your country nor have your ISP.
    You need to look up the required data and change that file yourself to revert back to what it was.

:sob:

1 Like

ok thanks of the help

‘resolveconf’ is part of DHCP; to set DNS, add this to /etc/dhcpcd.conf:

static domain_name_servers=8.8.8.8 8.8.4.4

For more info, read this.

3 Likes

Wow thanks It worked!
I can access Internet right away after login.
I have a small doubt I wanted to check resolv.conf now and I’m getting

cat: /etc/resolv.conf: No such file or directory

Is this normal?
I can access Internet so my problem is solved :slight_smile:

Try

cat /etc/resolv.conf

:grinning:

I did but still getting the same.

[linux@linux-hp ~]$ cat /etc/resolv.conf
cat: /etc/resolv.conf: No such file or directory

Sorry, I misread, but I can’t reproduce. The reference in my previous post about DHCP goes into more detail though, I’d look there first.

1 Like

I want to thank @Fabby , @Nachlese and @F2CPP for helping me.
After following @F2CPP solution I was able to access Internet right after login and without vpn.
There is some issue with resolv.conf being empty but I’m able to access Internet.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.