# IF THE CLIENT DEFINES THE PORT NUMBER, THE SERVER MUST ALSO CHANGE IT cat /etc/fwknop/fwknopd.conf | grep PCAP_FILTER cat /etc/fwknop/fwknopd.conf | grep PCAP_INTF
# START FWKNOP SERVER fwknopd
# CLOSE THE PORT STATUS UNTIL THE KNOCK ON THE DOOR SUCCEEDS iptables --insert INPUT --protocol tcp --dport 22 --match conntrack --ctstate ESTABLISHED,RELATED --jump ACCEPT iptables --insert INPUT 2 --protocol tcp --dport 22 --jump DROP
# RUN CLIENT AND CHECK PLAN [ 1 / 2 ] iptables -L FWKNOP_INPUT -n # Note that the iptables rules should not be overwritten, it is best to keep one hand exit
MAIN
1 2 3 4 5 6
# RUN CLIENT AND CHECK PLAN [ 1 / 2 ] # SERVER RUN ssh [user]@[SERVER_IP] iptables -L FWKNOP_INPUT -n # YOU CAN SEE THAT YOUR IP IS ALLOWED TO ACCESS # IF YOU CAN, YOU CAN MODIFY THE TIME, THE DEFAULT CONNECTION IS 30S
XRSec has the right to modify and interpret this article. If you want to reprint or disseminate this article, you must ensure the integrity of this article, including all contents such as copyright notice. Without the permission of the author, the content of this article shall not be modified or increased or decreased arbitrarily, and it shall not be used for commercial purposes in any way