Skip to content

Commit

Permalink
Exclude multicast DNS from the killswitch in mode 2
Browse files Browse the repository at this point in the history
So that we can still use mDNS hostnames for devices on the local network when the killswitch is enabled. Resolves ProtonVPN#247.
  • Loading branch information
Floppy committed Jun 26, 2021
1 parent 3ac008e commit 08785c0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions protonvpn_cli/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,9 @@ def manage_killswitch(mode, proto=None, port=None):
exclude_lan_commands = [
"iptables -A OUTPUT -o {0} -d {1} -j ACCEPT".format(default_nic, local_network), # noqa
"iptables -A INPUT -i {0} -s {1} -j ACCEPT".format(default_nic, local_network), # noqa
# multicast DNS
"iptables -A OUTPUT -p udp -o {0} -d 224.0.0.251/32 --dport 5353 -j ACCEPT ".format(default_nic), # noqa
"iptables -A INPUT -p udp -i {0} -s 224.0.0.251/32 --sport 5353 -j ACCEPT".format(default_nic), # noqa
]

for lan_command in exclude_lan_commands:
Expand Down

0 comments on commit 08785c0

Please sign in to comment.