D
D
DVoropaev2017-10-13 18:46:55
linux
DVoropaev, 2017-10-13 18:46:55

How to open port 25 in Centos?

I want to open port 25 (smtp) for Postfix.
Did it like this:

iptables -A INPUT -p tcp --dport 25 -m state --state NEW,ESTABLISHED -j ACCEPT
firewall-cmd --permanent --add-port=25/tcp --zone=public
firewall-cmd --permanent --zone public --add-service smtp
firewall-cmd --reload

Checking from another host:
map 172.21.164.11
...
PORT    STATE  SERVICE
22/tcp  open   ssh
25/tcp  closed smtp
80/tcp  open   http
443/tcp closed https

Why do some ports appear as closed in this list? How are they different from those. what is not displayed?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey, 2017-10-13
@SuNbka

Probably it would be more correct: one , two , three .

V
Victor Taran, 2017-10-13
@shambler81

iptables -I INPUT -p tcp --dport 25 -j ACCEPT
service iptables save

A
akelsey, 2017-10-14
@akelsey

A counter, perhaps stupid question, but you need to get an answer to it: Is Postfix running?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question