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 Rafficer#247.
  • Loading branch information
Floppy authored Oct 19, 2020
1 parent 494ccd9 commit d67a460
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 @@ -849,6 +849,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 --dport 5353 -j ACCEPT ".format(default_nic), # noqa
"iptables -A INPUT -p udp -i {0} -s 224.0.0.251 --sport 5353 -j ACCEPT".format(default_nic), # noqa
]

for lan_command in exclude_lan_commands:
Expand Down

0 comments on commit d67a460

Please sign in to comment.