Skip to content

Cannot resolve hostnames in container on FreeBSD #24023

Answered by dfr
Jomy10 asked this question in Q&A
Discussion options

You must be logged in to vote

This seems reasonable (although I don't usually use much more than the podman nat and rdr rules. Next thing to check on packets containing DNS queries:

  1. Do they get correctly NATed to the host IP address - check with something like tcpdump -i vtnet0 port dns
  2. If not, try to figure out if some rule in the PF config is blocking - check with tcpdump on pflog0
  3. If the packets manage to leave through vtnet0, are the replies visible?
  4. Do they get back into the container after reversing the NAT from step 1. This is a little tricky - look for interfaces with names starting with 'vnet' and match them to a container - you can use 'ifconfig' to see the interface description which will tell you the cont…

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@Jomy10
Comment options

@Jomy10
Comment options

@dfr
Comment options

Comment options

You must be logged in to vote
1 reply
@Jomy10
Comment options

Answer selected by Jomy10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants