Opening port with IP tables and UFW doesn't appear to open port
8,155
To open port with iptables
command is
sudo iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
For UFW
sudo ufw allow 443
Experience has learn me that it not good to mix iptables
and ufw
. Use only one of them.
Related videos on Youtube
Author by
Peter David Carter
Updated on September 18, 2022Comments
-
Peter David Carter over 1 year
I have attempted to open port 443 on a server I'm working on (Ubuntu 16.04):
/sbin/iptables -I INPUT -p tcp --dport 433 -m state --state NEW,ESTABLISHED -j ACCEPT
The port doesn't appear to be open:
nmap cubicverse.com Starting Nmap 7.01 ( https://nmap.org ) at 2017-06-18 17:52 BST Nmap scan report for cubicverse.com (104.131.17.139) Host is up (0.15s latency). Not shown: 998 closed ports PORT STATE SERVICE 22/tcp open ssh 80/tcp open http
Nmap done: 1 IP address (1 host up) scanned in 39.61 seconds Product of iptables -L:
Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpt:433 state NEW,ESTABLISHED Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination
I have also opened the port with ufw.
What alternative steps may be needed to open the port?
I am attempting to add an SSL cert for this server, and the 'SSL checker' keeps telling me I have a closed port and hence it can't validate the CSR.
I also know the port isn't open because:
-
steeldriver almost 7 yearsIs this any more than a simple typo? you've opened 433 whereas the checker appears to require 443
-
Peter David Carter almost 7 years@Thomas no-one would have answered there. If there is a referencing criteria please tell me.
-
Peter David Carter almost 7 years@steeldriver upvoted
-