ip address 192.168.X.Y/24
cat>/etc/resolv.conf<<EOF
nameserver 192.168.Z.Z
EOF
Dear Community Please advise. Above there is script written to linux container eve configuration tab in order to maintain dns resolution after container reload.
If it is entered manually when container loaded - it is works (ip setting works always - it is OK). But if it is entered in configuration tab and container reloaded -it does not work.
Seems I missed something. Thank you much all for future advise.
DNS resolution in a container
Moderator: mike
-
- Posts: 5084
- Joined: Wed Mar 15, 2017 4:44 pm
- Location: London
- Contact:
Re: DNS resolution in a container
# Set ip address and Default route
ip addr add 10.100.100.103/24 dev eth0 || true
ip route add default via 10.100.100.1 || true
# Set DNS server
cat > /etc/resolv.conf << EOF
nameserver 8.8.8.8
EOF
works always
ip addr add 10.100.100.103/24 dev eth0 || true
ip route add default via 10.100.100.1 || true
# Set DNS server
cat > /etc/resolv.conf << EOF
nameserver 8.8.8.8
EOF
works always
-
- Posts: 3
- Joined: Sat Dec 14, 2019 7:14 am
Re: DNS resolution in a container
Dear Uldis
Thank you much for your time
But it does not work. I test few times - all the same
Please see attachment. It should work but in reality - does not
After each container reloading need enter configuration again.
IP saved but not DNS resolv.conf
Very strange...Hope may be you could advise something
Regards, AntexMv
Thank you much for your time
But it does not work. I test few times - all the same
Please see attachment. It should work but in reality - does not
After each container reloading need enter configuration again.
IP saved but not DNS resolv.conf
Very strange...Hope may be you could advise something
Regards, AntexMv
You do not have the required permissions to view the files attached to this post.
-
- Posts: 5084
- Joined: Wed Mar 15, 2017 4:44 pm
- Location: London
- Contact:
Re: DNS resolution in a container
if your eve is behind proxy then need other cfg for NAT cloud
and please, if you made startup cfg for docker, do wipe node and start from this cfg...
and please, if you made startup cfg for docker, do wipe node and start from this cfg...