wknapik / vpnfailsafe

IP leak prevention for OpenVPN

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem during connection.

githubtefo opened this issue · comments

Hi!
I'm trying to use the script, but something goes wrong during connection.
I installed via AUR.
The output of openvpn after the init of vpnfailsafe.sh is:
/usr/lib/resolvconf/libc: line 230: /etc/resolv.conf: No such file or directory Fri Jun 16 09:25:20 2017 /usr/bin/ip route add "VPN IP"/32 via 192.168.0.1 RTNETLINK answers: File exists

The connection never completed and I hasn't access to internet.
What should I do?
Thanks!

Hi @githubtefo

I'm not sure what happened there with resolvconf. Google says some people have had the "/usr/lib/resolvconf/libc: line 230: /etc/resolv.conf: Operation not permitted" error, when the file was set immutable (the fix is running chattr -i /etc/resolv.conf as root), but you're getting "no such file or directory", which makes no sense, unless, somehow, the script doesn't see /etc...

I guess if your /etc/resolvconf.conf file is b0rken, that could lead to "no such file". Do you have a line resolv_conf=/etc/resolv.conf in your /etc/resolvconf.conf ? If not, you should.

Please post how you start the VPN connection and a full log from its execution (feel free to remove any sensitive information). Also the VPN config you're using might be helpful (again - minus any secrets). If you're unsure how OpenVPN is started in your case, running openvpn --config path_to_your_vpn_config as root would be the simplest way to go. Logs will be printed to standard output.

As for the second error, this is safe to ignore. More information about that is in the README.

Also, the README explains what to do to restore your settings back to the state from before running vpnfailsafe. Since you're on Arch, you can just do systemctl restart iptables.service and have access to the internet, as before.

If you ever need access to the README and you have no functioning internet connection, you can find it on your disk at /usr/share/doc/vpnfailsafe/README.md.

Once you post the info I asked for, we can dig for the cause of all this.

Cheers.

PS. I assume the "VPN IP" part in the second error was a manual edit of an actual IP, right ?

@wknapik , thanks for your answer!

  1. I have a line resolv_conf=/etc/resolv.conf in my /etc/resolvconf.conf.
  2. I tried sudo chattr -i /etc/resolv.conf and the output was: chattr: Operation not supported while reading flags on /etc/resolv.conf
    3)a) I run: sudo openvpn --config CONFIG-NAME.ovpn --script-security 2 --up /etc/openvpn/vpnfailsafe.sh --down /etc/openvpn/vpnfailsafe.sh
    3)b) Log from openvpn:
Thu Jun 22 09:43:39 2017 OpenVPN 2.4.2 x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on May 11 2017
Thu Jun 22 09:43:39 2017 library versions: OpenSSL 1.1.0f  25 May 2017, LZO 2.10
Enter Auth Username: USERNAME
Enter Auth Password: PASS
Thu Jun 22 09:43:57 2017 WARNING: --ping should normally be used with --ping-restart or --ping-exit
Thu Jun 22 09:43:57 2017 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Thu Jun 22 09:43:57 2017 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Thu Jun 22 09:43:57 2017 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Thu Jun 22 09:43:57 2017 TCP/UDP: Preserving recently used remote address: [AF_INET]IP REMOTE:1194
Thu Jun 22 09:43:57 2017 Socket Buffers: R=[212992->212992] S=[212992->212992]
Thu Jun 22 09:43:57 2017 UDP link local: (not bound)
Thu Jun 22 09:43:57 2017 UDP link remote: [AF_INET]IP REMOTE:1194
Thu Jun 22 09:43:57 2017 TLS: Initial packet from [AF_INET]IP REMOTE:1194, sid=e7e67eb1 6de0a59f
Thu Jun 22 09:43:57 2017 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Thu Jun 22 09:43:57 2017 VERIFY OK: depth=1, C= , ST= 
[CONFIG.ovpn.txt](https://github.com/wknapik/vpnfailsafe/files/1095018/CONFIG.ovpn.txt)

, L=COUNTRY, O=VPN-NAME, OU=VPN-NAME, CN=VPN-SERVER, name=VPN-NAME, emailAddress=VPN-MAIL
Thu Jun 22 09:43:57 2017 VERIFY KU OK
Thu Jun 22 09:43:57 2017 Validating certificate extended key usage
Thu Jun 22 09:43:57 2017 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
Thu Jun 22 09:43:57 2017 VERIFY EKU OK
(...)
Thu Jun 22 09:43:58 2017 Control Channel: TLSv1.2, cipher TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384, 2048 bit RSA
Thu Jun 22 09:43:58 2017 [VPN-SERVER] Peer Connection Initiated with [AF_INET]IP:1194
Thu Jun 22 09:43:59 2017 SENT CONTROL [VPN-SERVER]: 'PUSH_REQUEST' (status=1)
Thu Jun 22 09:43:59 2017 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,sndbuf 524288,rcvbuf 524288,dhcp-option DNS IP,dhcp-option DNS IP,route-gateway 10.8.8.1,topology subnet,ping 60,ping-restart 180,ifconfig 10.8.8.88 255.255.255.0,peer-id 0,cipher AES-256-GCM'
Thu Jun 22 09:43:59 2017 OPTIONS IMPORT: timers and/or timeouts modified
Thu Jun 22 09:43:59 2017 OPTIONS IMPORT: --sndbuf/--rcvbuf options modified
Thu Jun 22 09:43:59 2017 Socket Buffers: R=[212992->425984] S=[212992->425984]
Thu Jun 22 09:43:59 2017 OPTIONS IMPORT: --ifconfig/up options modified
Thu Jun 22 09:43:59 2017 OPTIONS IMPORT: route options modified
Thu Jun 22 09:43:59 2017 OPTIONS IMPORT: route-related options modified
Thu Jun 22 09:43:59 2017 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Thu Jun 22 09:43:59 2017 OPTIONS IMPORT: peer-id set
Thu Jun 22 09:43:59 2017 OPTIONS IMPORT: adjusting link_mtu to 1657
Thu Jun 22 09:43:59 2017 OPTIONS IMPORT: data channel crypto options modified
Thu Jun 22 09:43:59 2017 Data Channel Encrypt: Cipher 'AES-256-GCM' initialized with 256 bit key
Thu Jun 22 09:43:59 2017 Data Channel Decrypt: Cipher 'AES-256-GCM' initialized with 256 bit key
Thu Jun 22 09:43:59 2017 ROUTE_GATEWAY 192.168.0.1/255.255.255.0 IFACE=wlan0 HWADDR=MASK
Thu Jun 22 09:43:59 2017 TUN/TAP device tun0 opened
Thu Jun 22 09:43:59 2017 TUN/TAP TX queue length set to 100
Thu Jun 22 09:43:59 2017 do_ifconfig, tt->did_ifconfig_ipv6_setup=0
Thu Jun 22 09:43:59 2017 /usr/bin/ip link set dev tun0 up mtu 1500
Thu Jun 22 09:43:59 2017 /usr/bin/ip addr add dev tun0 10.8.8.88/24 broadcast 10.8.8.255
Thu Jun 22 09:43:59 2017 /etc/openvpn/vpnfailsafe.sh tun0 1500 1585 10.8.8.88 255.255.255.0 init
/usr/lib/resolvconf/libc: line 230: /etc/resolv.conf: No such file or directory
Thu Jun 22 09:44:20 2017 /usr/bin/ip route add IP/32 via 192.168.0.1
RTNETLINK answers: File exists
Thu Jun 22 09:44:20 2017 ERROR: Linux route add command failed: external program exited with error status: 2
Thu Jun 22 09:44:20 2017 /usr/bin/ip route add 0.0.0.0/1 via 10.8.8.1
RTNETLINK answers: File exists
Thu Jun 22 09:44:20 2017 ERROR: Linux route add command failed: external program exited with error status: 2
Thu Jun 22 09:44:20 2017 /usr/bin/ip route add 128.0.0.0/1 via 10.8.8.1
RTNETLINK answers: File exists
Thu Jun 22 09:44:20 2017 ERROR: Linux route add command failed: external program exited with error status: 2
Thu Jun 22 09:44:20 2017 Initialization Sequence Completed
^CThu Jun 22 09:45:03 2017 event_wait : Interrupted system call (code=4)
Thu Jun 22 09:45:03 2017 SIGTERM received, sending exit notification to peer
Thu Jun 22 09:45:06 2017 /usr/bin/ip route del IP/32
Thu Jun 22 09:45:06 2017 /usr/bin/ip route del 0.0.0.0/1
Thu Jun 22 09:45:06 2017 /usr/bin/ip route del 128.0.0.0/1
Thu Jun 22 09:45:06 2017 Closing TUN/TAP interface
Thu Jun 22 09:45:06 2017 /usr/bin/ip addr del dev tun0 10.8.8.88/24
Thu Jun 22 09:45:06 2017 /etc/openvpn/vpnfailsafe.sh tun0 1500 1585 10.8.8.88 255.255.255.0 init
Thu Jun 22 09:45:06 2017 SIGTERM[soft,exit-with-notification] received, process exiting
  1. I attach the .ovpn config file
    CONFIG.ovpn.txt

  2. I can't restore my settings back to the state from before running vpnfailsafe to recover internet connection: $ sudo systemctl restart iptables.service Job for iptables.service failed because the control process exited with error code.

  3. (P.S.) Yes, in CAPITALS I putted the manual edition.

  1. I have a line resolv_conf=/etc/resolv.conf in my /etc/resolvconf.conf.

Ok, that's good.

  1. I tried sudo chattr -i /etc/resolv.conf and the output was: chattr: Operation not supported while reading flags on /etc/resolv.conf

It might be a symlink, which would cause the error. But no matter, we'll figure it out. Let's move on.

3)a) I run: sudo openvpn --config CONFIG-NAME.ovpn --script-security 2 --up /etc/openvpn/vpnfailsafe.sh --down /etc/openvpn/vpnfailsafe.sh

Ok, the invocation looks fine.

3)b) Log from openvpn:

Thu Jun 22 09:43:39 2017 OpenVPN 2.4.2 x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on May 11 2017
Thu Jun 22 09:43:39 2017 library versions: OpenSSL 1.1.0f  25 May 2017, LZO 2.10
Enter Auth Username: USERNAME
Enter Auth Password: PASS

BTW, you can use the auth-user-pass option to store your credentials in a file, so you don't have to enter them manually. It's convenient, if not the most secure. But I digress...

Thu Jun 22 09:43:57 2017 WARNING: --ping should normally be used with --ping-restart or --ping-exit
Thu Jun 22 09:43:57 2017 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Thu Jun 22 09:43:57 2017 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Thu Jun 22 09:43:57 2017 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Thu Jun 22 09:43:57 2017 TCP/UDP: Preserving recently used remote address: [AF_INET]IP REMOTE:1194
Thu Jun 22 09:43:57 2017 Socket Buffers: R=[212992->212992] S=[212992->212992]
Thu Jun 22 09:43:57 2017 UDP link local: (not bound)
Thu Jun 22 09:43:57 2017 UDP link remote: [AF_INET]IP REMOTE:1194
Thu Jun 22 09:43:57 2017 TLS: Initial packet from [AF_INET]IP REMOTE:1194, sid=e7e67eb1 6de0a59f
Thu Jun 22 09:43:57 2017 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Thu Jun 22 09:43:57 2017 VERIFY OK: depth=1, C= , ST= 
[CONFIG.ovpn.txt](https://github.com/wknapik/vpnfailsafe/files/1095018/CONFIG.ovpn.txt)
, L=COUNTRY, O=VPN-NAME, OU=VPN-NAME, CN=VPN-SERVER, name=VPN-NAME, emailAddress=VPN-MAIL

What happened here ? An accidental paste ?

Thu Jun 22 09:43:57 2017 VERIFY KU OK
Thu Jun 22 09:43:57 2017 Validating certificate extended key usage
Thu Jun 22 09:43:57 2017 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
Thu Jun 22 09:43:57 2017 VERIFY EKU OK
(...)
Thu Jun 22 09:43:58 2017 Control Channel: TLSv1.2, cipher TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384, 2048 bit RSA
Thu Jun 22 09:43:58 2017 [VPN-SERVER] Peer Connection Initiated with [AF_INET]IP:1194
Thu Jun 22 09:43:59 2017 SENT CONTROL [VPN-SERVER]: 'PUSH_REQUEST' (status=1)
Thu Jun 22 09:43:59 2017 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,sndbuf 524288,rcvbuf 524288,dhcp-option DNS IP,dhcp-option DNS IP,route-gateway 10.8.8.1,topology subnet,ping 60,ping-restart 180,ifconfig 10.8.8.88 255.255.255.0,peer-id 0,cipher AES-256-GCM'
Thu Jun 22 09:43:59 2017 OPTIONS IMPORT: timers and/or timeouts modified
Thu Jun 22 09:43:59 2017 OPTIONS IMPORT: --sndbuf/--rcvbuf options modified
Thu Jun 22 09:43:59 2017 Socket Buffers: R=[212992->425984] S=[212992->425984]
Thu Jun 22 09:43:59 2017 OPTIONS IMPORT: --ifconfig/up options modified
Thu Jun 22 09:43:59 2017 OPTIONS IMPORT: route options modified
Thu Jun 22 09:43:59 2017 OPTIONS IMPORT: route-related options modified
Thu Jun 22 09:43:59 2017 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Thu Jun 22 09:43:59 2017 OPTIONS IMPORT: peer-id set
Thu Jun 22 09:43:59 2017 OPTIONS IMPORT: adjusting link_mtu to 1657
Thu Jun 22 09:43:59 2017 OPTIONS IMPORT: data channel crypto options modified
Thu Jun 22 09:43:59 2017 Data Channel Encrypt: Cipher 'AES-256-GCM' initialized with 256 bit key
Thu Jun 22 09:43:59 2017 Data Channel Decrypt: Cipher 'AES-256-GCM' initialized with 256 bit key
Thu Jun 22 09:43:59 2017 ROUTE_GATEWAY 192.168.0.1/255.255.255.0 IFACE=wlan0 HWADDR=MASK
Thu Jun 22 09:43:59 2017 TUN/TAP device tun0 opened
Thu Jun 22 09:43:59 2017 TUN/TAP TX queue length set to 100
Thu Jun 22 09:43:59 2017 do_ifconfig, tt->did_ifconfig_ipv6_setup=0
Thu Jun 22 09:43:59 2017 /usr/bin/ip link set dev tun0 up mtu 1500
Thu Jun 22 09:43:59 2017 /usr/bin/ip addr add dev tun0 10.8.8.88/24 broadcast 10.8.8.255
Thu Jun 22 09:43:59 2017 /etc/openvpn/vpnfailsafe.sh tun0 1500 1585 10.8.8.88 255.255.255.0 init
/usr/lib/resolvconf/libc: line 230: /etc/resolv.conf: No such file or directory

Well, line 230 of /usr/lib/resolvconf/libc is:
(umask 022; printf %s "$newconf" >"$resolv_conf")

Just redirecting printf output to /etc/resolv.conf. Straightforward enough.
The error is weird. You're running as root, $resolv_conf == /etc/resolv.conf and /etc exists. The "no such file" error doesn't make sense...

Could you post the output of running these as root:

  • lsattr /etc/resolv.conf
  • ls -l /etc/resolv.conf
  • strace tee -a /etc/resolv.conf <<<'# testing123'
  • cat /etc/resolv.conf (before and after a connection is made)
  • resolvconf -l (before and after a connection is made)
Thu Jun 22 09:44:20 2017 /usr/bin/ip route add IP/32 via 192.168.0.1
RTNETLINK answers: File exists
Thu Jun 22 09:44:20 2017 ERROR: Linux route add command failed: external program exited with error status: 2
Thu Jun 22 09:44:20 2017 /usr/bin/ip route add 0.0.0.0/1 via 10.8.8.1
RTNETLINK answers: File exists
Thu Jun 22 09:44:20 2017 ERROR: Linux route add command failed: external program exited with error status: 2
Thu Jun 22 09:44:20 2017 /usr/bin/ip route add 128.0.0.0/1 via 10.8.8.1
RTNETLINK answers: File exists
Thu Jun 22 09:44:20 2017 ERROR: Linux route add command failed: external program exited with error status: 2

This is fine.

Thu Jun 22 09:44:20 2017 Initialization Sequence Completed

This indicates a successful connection.

What is the problem at this point ? Can't connect to hosts on the internet ?
I'm guessing the connection is fine, just resolv.conf isn't and you can't resolve domain names.

What is the output of ping -c 2 8.8.8.8 ?

^CThu Jun 22 09:45:03 2017 event_wait : Interrupted system call (code=4)
Thu Jun 22 09:45:03 2017 SIGTERM received, sending exit notification to peer
Thu Jun 22 09:45:06 2017 /usr/bin/ip route del IP/32
Thu Jun 22 09:45:06 2017 /usr/bin/ip route del 0.0.0.0/1
Thu Jun 22 09:45:06 2017 /usr/bin/ip route del 128.0.0.0/1
Thu Jun 22 09:45:06 2017 Closing TUN/TAP interface
Thu Jun 22 09:45:06 2017 /usr/bin/ip addr del dev tun0 10.8.8.88/24
Thu Jun 22 09:45:06 2017 /etc/openvpn/vpnfailsafe.sh tun0 1500 1585 10.8.8.88 255.255.255.0 init
Thu Jun 22 09:45:06 2017 SIGTERM[soft,exit-with-notification] received, process exiting

4) I attach the .ovpn config file 
[CONFIG.ovpn.txt](https://github.com/wknapik/vpnfailsafe/files/1095027/CONFIG.ovpn.txt)

Some of these options I'm not familiar with, but nothing seems obviously wrong.

  1. I can't restore my settings back to the state from before running vpnfailsafe to recover internet connection: $ sudo systemctl restart iptables.service Job for iptables.service failed because the control process exited with error code.

Well, for this service to work, you need to have your rules written to a file.
You can do that by running iptables-save >/etc/iptables/iptables.rules, just make sure not to save the rules created by vpnfailsafe - those are meant to be handled by the script.
If you're not sure how to set up reasonable firewall rules, you can go with this:

# Clear all existing rules.
iptables -F
iptables -X
for table in nat mangle raw security; do
    for opt in -F -X; do
        iptables -t "$table" "$opt"
    done
done

# Set up minimal firewall.
iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT
iptables -P FORWARD DROP
iptables -I INPUT -i lo -j ACCEPT
iptables -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT

This will clear all the rules you have and only allow connections you initiated, which is what most people want.

Anyway, once you post the info I asked for, we can sort it out.
As I understand it, it appears there's no internet connection after the VPN connection is made, correct ? I'm guessing the connection is fine, just the DNS resolution isn't. The additional info will make it possible to find out why.

Here the outputs:

[user@host ~]$ sudo lsattr /etc/resolv.conf
lsattr: Operation not supported While reading flags on /etc/resolv.conf

[user@host ~]$ sudo ls -l /etc/resolv.conf
lrwxrwxrwx 1 root root 28 Mar 13  2016 /etc/resolv.conf -> /var/run/connman/resolv.conf

[user@host ~]$ sudo strace tee -a /etc/resolv.conf <<<'# testing123'
execve("/usr/bin/tee", ["tee", "-a", "/etc/resolv.conf"], 0x7ffca5203c70 /* 17 vars */) = 0
brk(NULL)                               = 0xccc000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=161556, ...}) = 0
mmap(NULL, 161556, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f4f97e78000
close(3)                                = 0
open("/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\5\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1981712, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4f97e76000
mmap(NULL, 3819824, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4f978d8000
mprotect(0x7f4f97a74000, 2093056, PROT_NONE) = 0
mmap(0x7f4f97c73000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x19b000) = 0x7f4f97c73000
mmap(0x7f4f97c79000, 14640, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f4f97c79000
close(3)                                = 0
arch_prctl(ARCH_SET_FS, 0x7f4f97e774c0) = 0
mprotect(0x7f4f97c73000, 16384, PROT_READ) = 0
mprotect(0x607000, 4096, PROT_READ)     = 0
mprotect(0x7f4f97ea0000, 4096, PROT_READ) = 0
munmap(0x7f4f97e78000, 161556)          = 0
brk(NULL)                               = 0xccc000
brk(0xced000)                           = 0xced000
fadvise64(0, 0, 0, POSIX_FADV_SEQUENTIAL) = 0
open("/etc/resolv.conf", O_WRONLY|O_CREAT|O_APPEND, 0666) = -1 ENOENT (No such file or directory)
write(2, "tee: ", 5tee: )                    = 5
write(2, "/etc/resolv.conf", 16/etc/resolv.conf)        = 16
write(2, ": No such file or directory", 27: No such file or directory) = 27
write(2, "\n", 1
)                       = 1
read(0, "# testing123\n", 8192)         = 13
write(1, "# testing123\n", 13# testing123
)          = 13
read(0, "", 8192)                       = 0
close(0)                                = 0
close(1)                                = 0
close(2)                                = 0
exit_group(1)                           = ?
+++ exited with 1 +++

BEFORE connection:

[user@host ~]$ sudo cat /etc/resolv.conf
cat: /etc/resolv.conf: No such file or directory

[user@host ~]$ sudo resolvconf -l
[user@host ~]$ 

AFTER connection: 

[user@host ~]$ sudo cat /etc/resolv.conf
cat: /etc/resolv.conf: No existe el fichero o el directorio

[user@host ~]$ sudo resolvconf -l
[user@host ~]$ 

Thanks for the auth-user-pass advice!
Yes, last 2 lines were an accidental paste.
It is correct, the problem is that there is no internet connection after the VPN connection is made.
Thanks @wknapik for the help!

Hi @githubtefo

It seems you've run into this connman bug https://bugs.archlinux.org/task/48044. If you're not using connman, I'd suggest uninstalling it. If you are, I'd look for a package that doesn't mess up your system.

Once you get rid of the dead /etc/resolv.conf symlink created by connman and replace it with a regular file, everything should start working. /etc/resolv.conf will likely get populated when you connect to your network, but if for whatever reason that doesn't work, you can temporarily set it's contents to nameserver 8.8.8.8 to get up and running.

Let me know how it goes ;]

@wknapik
I'm in trouble, given I use lxqt and there is no an easy way to replace connman with other lxqt- like package.
I try to mannually set the content of /etc/resolv.conf but the system still says /etc/resolv.conf: No such file or directory How can I do it?

Hi @githubtefo. I don't think using LXQt ties you to Connman. The Arch wiki on LXQt only mentions a connman systray applet, but I'm guessing you could use NetworkManager, or Wicd instead. If Connman is really a must, at least try removing the dead /etc/resolv.conf symlink and updating to the latest version of the package. According to the bug report page, it's fixed in the version currently in Arch.

Yes, you are right, there are several options...
I removed the old/dead symlink and now is working! Apparently it remained from an older package with the bug.
Now the error /etc/resolv.conf: No such file or directory disappeared and the connection has internet access :)
Thanks @wknapik
We should close the issue, shouldn't it?

That's great @githubtefo. Glad I could help :)