Skip to content

Instantly share code, notes, and snippets.

@grammy-jiang
Last active March 16, 2020 01:27
Show Gist options
  • Save grammy-jiang/5197f05749013d9e34ecae0fa600b5a8 to your computer and use it in GitHub Desktop.
Save grammy-jiang/5197f05749013d9e34ecae0fa600b5a8 to your computer and use it in GitHub Desktop.
The zone configuration of public
<?xml version="1.0" encoding="utf-8"?>
<zone>
<short>Public</short>
<description>For use in public areas. You do not trust the other computers on networks to not harm your computer. Only selected incoming connections are accepted.</description>
<interface name="eth0"/>
<service name="dhcpv6-client"/>
<service name="mosh"/>
</zone>
@grammy-jiang
Copy link
Author

grammy-jiang commented Mar 16, 2020

After setting up the service of knockd, remove ssh from the zone of public:

foo@bar:~$ sudo firewall-cmd --permanent --zone=public --remove-service=ssh && sudo firewall-cmd --reload

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment