D
D
dskiselev2014-10-26 14:44:24
CentOS
dskiselev, 2014-10-26 14:44:24

How to open a port on CentOS 6?

Hello.
On the Internet, they write that the ports are opened by the command

iptables -A INPUT -p tcp -m tcp --dport 8080 -j ACCEPT

if after that check
iptables --line-numbers -n -L
the record appears
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination
1    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:8080

Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination

but when scanning using the
nmap IP_адрес
port is not in the list
PORT   STATE SERVICE
22/tcp open  ssh

Tell me, please, what am I doing wrong?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
akarin, 2014-10-26
@akarin

What gives out?
netstat -an

R
reiton, 2014-10-26
@reiton

And what service do you have hanging on port 8080 that you want to see it in the nmap list?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question