can't open port 25 on CentOS
The accept line for your port 25
-A INPUT -p tcp -m tcp --dport 25 -j ACCEPT
comes after the blanket reject
-A INPUT -j REJECT --reject-with icmp-host-prohibited
Switch them round and reload. Iptables works on first match wins so the ACCEPT will never be actioned. The reason you can connect to localhost is that there is a blanket accept
-A INPUT -i lo -j ACCEPT
before the reject.
If that doesn't work, then ckeck postfix is listening on the relevant IP address, check the output of
netstat -tnlp | grep 25
and take approprite action. If it's not that then it's most likely that someone else is blocking port 25 upstream of you.
Related videos on Youtube
Dimitar Dimitrov
Updated on September 18, 2022Comments
-
Dimitar Dimitrov almost 2 years
I have a relatively simple stored procedure which is just a select statement from 2 joined tables, and has a single parameter.
Running it in SSMS returns, for example, 6 rows.
In Report Builder, I created a dataset from this SP, and I added the fields manually in the Fields tab, using the same names as in the SP.
I pull the fields to a tablix - which returns empty rows, but interestingly - 6 empty rows. So it works fine in SSMS and Query Designer - but nothing when executing.
I have tried creating a brand new report from scratch, and I have checked for white font on white background - no result.
Any clues what could be the reason?
thanks in advance,
-
Ladadadada over 11 yearsIt's better to look at the actual running configuration rather than the stored-on-disk configuration. They can differ. In your case:
iptables -L -nv
,postconf -n
andnetstat -tlnp
. My guess is that it's none of these and your hosting provider is blocking port 25 inbound with their own firewall. -
CloudWeavers over 11 yearsYou are blocking port 25 at the -j REJECT [...] line. Re-add your accept rules with 'iptables -I INPUT 1 -p tcp --dport 25 -j ACCEPT'
-
Anton Cohen over 11 yearsYour server provider might not block port 25, but most home ISPs block customers from connecting to port 25. So if you are testing from home that is probably the issue.
-
user9517 over 11 yearsDid you reload your iptables
service iptables restart
?
-