Answer the question
In order to leave comments, you need to log in
How to set up a firewall?
I can't set up a firewall with iptables. It is necessary to allow the passage of traffic to the port SSH (tcp / 22) and WireGuard (udp, tcp / 51820), and the request from tcp / 80 and tcp / 443 ports.
Answer the question
In order to leave comments, you need to log in
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp -m multiport --dports 22,80,443 -j ACCEPT
iptables -A INPUT -p udp -m multiport --dports 51820 -j ACCEPT
iptables -A INPUT -j REJECT --reject-with icmp-host-prohibited
https://www.opennet.ru/docs/RUS/iptables/
well, read it....
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question