Skip to content

Commit 1a24ad0

Browse files
authored
add another iptables rule to allow dns queries from container
1 parent 73d74ad commit 1a24ad0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

content/manuals/engine/network/packet-filtering-firewalls.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ the source and destination. For instance, if the Docker host has addresses
119119
`2001:db8:1111::2` and `2001:db8:2222::2`, you can make rules specific to
120120
`2001:db8:1111::2` and leave `2001:db8:2222::2` open.
121121

122+
If your containers are also querying DNS, you should add this rule as well to allow them to work:
123+
```
124+
$ iptables -I DOCKER-USER -m state --state RELATED,ESTABLISHED -j ACCEPT
125+
```
126+
122127
`iptables` is complicated. There is a lot more information at [Netfilter.org HOWTO](https://www.netfilter.org/documentation/HOWTO/NAT-HOWTO.html).
123128

124129
### Direct routing

0 commit comments

Comments
 (0)