Hi all,
I’m using srsLTE-emane (https://github.com/adjacentlink/srsLTE-emane), an open source software that emulates LTE Network, and I have a problem with DNS resolution in LXC container.
I’m running a demonstration (found on https://github.com/adjacentlink/emane-model-lte.git) made by three containers: ue-02 (the mobile phone), enb-21 (the radio base station) and epc-01 (the core network of LTE). I’m able to ping any IP address from ue-02 (for example 104.83.108.242):
root@ue-02:~# ping 104.83.108.242 -c 5
PING 104.83.108.242 (104.83.108.242) 56(84) bytes of data.
64 bytes from 104.83.108.242: icmp_seq=1 ttl=50 time=96.8 ms
64 bytes from 104.83.108.242: icmp_seq=2 ttl=50 time=95.1 ms
64 bytes from 104.83.108.242: icmp_seq=3 ttl=50 time=94.5 ms
64 bytes from 104.83.108.242: icmp_seq=4 ttl=50 time=93.0 ms
64 bytes from 104.83.108.242: icmp_seq=5 ttl=50 time=91.8 ms
I’m not able to activate the DNS resolution (where www.repubblica.it is the internet site related to 104.83.108.242):
root@ue-02:~# nslookup www.repubblica.it
;; connection timed out; no servers could be reached
root@ue-02:~# LC_ALL=C ping www.repubblica.it
ping: www.repubblica.it: Name or service not known
I have read the instructions to modify the file resolv.conf, but these containers don’t have this file: these are a bit different from classical LXC containers. The unique configuration file is lxc.conf.
Strangely it’s not needed with Arch Linux that automatically set it, but it’s needed with Debian, probably due to DHCP default settings. I need to figure out why, I only try LXC for few days now.
I thought about different option relative to DHCP in /etc/system/network/eth0.network, but putting the exact same file don’t resolv the problem.
I’m having this exact issue, and I can’t work it out. My container is using an existing bridge (br0) to get a real local IP, and all the networking works fine; I can ping all the hosts on my local network, I can ping my container from any other host, and I can ping external IPs like google.com from the container, but the container cannot get to port 53 anywhere:
# nc -vz 8.8.8.8 53
nc: connect to 8.8.8.8 port 53 (tcp) failed: Connection refused
or even my local DHCP server:
# nc -vz 192.168.86.1 53
nc: connect to 192.168.86.1 port 53 (tcp) failed: Connection refused
If I try the identical command on may main host:
# nc -vz 8.8.8.8 53
Connection to 8.8.8.8 53 port [tcp/domain] succeeded!
ufw is completely disabled on my main host, and it is not even installed on my container.
There’s something I’m not seeing here. What is it about the LXC configuration that is blocking any access to port 53, yet all the other networking works fine, e.g. port 80 at google.com has no issue:
# nc -vz 142.251.16.139 80
Connection to 142.251.16.139 80 port [tcp/http] succeeded!
There has to be something in the LXC config which is causing this, but I just can’t see it