Fixing DNS issue in LXC virtualization

This commit is contained in:
myvesta 2020-12-21 18:40:58 +01:00 committed by GitHub
commit 5be1e2d56d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -60,7 +60,7 @@ echo "$iptables -P INPUT ACCEPT" >> $tmp
echo "$iptables -F INPUT" >> $tmp
# Enabling stateful support
if [ "$conntrack" != 'no' ]; then
if [ "$conntrack" != 'no' ] || grep --quiet container=lxc /proc/1/environ; then
str="$iptables -A INPUT -m state"
str="$str --state ESTABLISHED,RELATED -j ACCEPT"
echo "$str" >> $tmp