core/proxyvm: allow TCP traffic to DNS servers
Some DNS queries requires TCP - namely those with response not fitting in 512 bytes.
This commit is contained in:
parent
7a639911f8
commit
4ea600c8d3
@ -178,9 +178,16 @@ class QubesProxyVm(QubesNetVm):
|
|||||||
iptables += " -j {0}\n".format(rules_action)
|
iptables += " -j {0}\n".format(rules_action)
|
||||||
|
|
||||||
if conf["allowDns"] and self.netvm is not None:
|
if conf["allowDns"] and self.netvm is not None:
|
||||||
# PREROUTING does DNAT to NetVM DNSes, so we need self.netvm. properties
|
# PREROUTING does DNAT to NetVM DNSes, so we need self.netvm.
|
||||||
iptables += "-A FORWARD -s {0} -p udp -d {1} --dport 53 -j ACCEPT\n".format(ip,self.netvm.gateway)
|
# properties
|
||||||
iptables += "-A FORWARD -s {0} -p udp -d {1} --dport 53 -j ACCEPT\n".format(ip,self.netvm.secondary_dns)
|
iptables += "-A FORWARD -s {0} -p udp -d {1} --dport 53 -j " \
|
||||||
|
"ACCEPT\n".format(ip,self.netvm.gateway)
|
||||||
|
iptables += "-A FORWARD -s {0} -p udp -d {1} --dport 53 -j " \
|
||||||
|
"ACCEPT\n".format(ip,self.netvm.secondary_dns)
|
||||||
|
iptables += "-A FORWARD -s {0} -p tcp -d {1} --dport 53 -j " \
|
||||||
|
"ACCEPT\n".format(ip,self.netvm.gateway)
|
||||||
|
iptables += "-A FORWARD -s {0} -p tcp -d {1} --dport 53 -j " \
|
||||||
|
"ACCEPT\n".format(ip,self.netvm.secondary_dns)
|
||||||
if conf["allowIcmp"]:
|
if conf["allowIcmp"]:
|
||||||
iptables += "-A FORWARD -s {0} -p icmp -j ACCEPT\n".format(ip)
|
iptables += "-A FORWARD -s {0} -p icmp -j ACCEPT\n".format(ip)
|
||||||
if conf["allowYumProxy"]:
|
if conf["allowYumProxy"]:
|
||||||
|
Loading…
Reference in New Issue
Block a user