If you need to open up ports 80
and 443
, on file /etc/iptables/rules.v4
just add
-A INPUT -p tcp -m state --state NEW -m multiport --dports 80,443 -j ACCEPT
directly below
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
And reboot OR run bellow
sudo /sbin/iptables-restore < /etc/iptables/rules.v4
Thanks for the suggestion @11k
See that some lines of the rules.v4
file are commented with # at the beginning
It seems that tcp connections on ports 80, 443, and 51820 have been allowed. But the udp connection of port 51820 used by wireguard does not seem to be effective.