iptables open port [SOLVED]

If none of the more specific forums is the right place to ask

Re: iptables open port [SOLVED]

Postby Chrisdb » 2020-01-20 09:30

Kirill_code wrote:Hi, I have same issue:
I use tomcat 9.0.3 with this configs:

<Connector
protocol="org.apache.coyote.http11.Http11NioProtocol"
port="8443" maxThreads="200"
scheme="https" secure="true" SSLEnabled="true"
keystoreFile="mystore2" keystorePass="PWD"
clientAuth="false" sslProtocol="TLS"/>
and this listners:
org.apache.catalina.startup.VersionLoggerListener
org.apache.catalina.core.JreMemoryLeakPreventionListener
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
org.apache.catalina.core.ThreadLocalLeakPreventionListener

when I try connect from browser it throw ERR_CONNECTION_REFUSED

I try open 8443 port by:

iptables -I INPUT 1 -p tcp --dport 8443 -j ACCEPT
ufw allow https
But when I check remotely port closed even though result of ufw status:

Status: active
To Action From
-- ------ ----
OpenSSH ALLOW Anywhere
8080 ALLOW Anywhere
8443 ALLOW Anywhere
22 ALLOW Anywhere
80/tcp ALLOW Anywhere
443/tcp ALLOW Anywhere
OpenSSH (v6) ALLOW Anywhere (v6)
8080 (v6) ALLOW Anywhere (v6)
8443 (v6) ALLOW Anywhere (v6)
22 (v6) ALLOW Anywhere (v6)
80/tcp (v6) ALLOW Anywhere (v6)
443/tcp (v6) ALLOW Anywhere (v6)

netstat -tulpn | grep LISTEN:

tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 622/sshd
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 684/mysqld
tcp6 0 0 :::22 :::* LISTEN 622/sshd
tcp6 0 0 127.0.0.1:8005 :::* LISTEN 618/java
tcp6 0 0 :::8080 :::* LISTEN 618/java


Please open another thread and post results of:
Code: Select all
netstat -tulpn
lsof -i


seems like there's nothing listening on that port... Is tomcat running :D
Chrisdb
 
Posts: 253
Joined: 2018-04-10 07:16

Re: iptables open port [SOLVED]

Postby Head_on_a_Stick » 2020-01-20 12:29

Kirill_code wrote:I try open 8443 port by:
Code: Select all
iptables -I INPUT 1 -p tcp --dport 8443 -j ACCEPT
ufw allow https

But when I check remotely port closed even though result of ufw status

As noted by p.H above, iptables cannot open or close ports, it can only allow or deny access to them.
User avatar
Head_on_a_Stick
 
Posts: 11204
Joined: 2014-06-01 17:46
Location: /dev/chair

Previous

Return to General Questions

Who is online

Users browsing this forum: No registered users and 12 guests

fashionable