Non root user using telnet refused

Support for security such as Firewalls and securing linux
Post Reply
rezashamdani
Posts: 1
Joined: 2019/04/11 03:39:19

Non root user using telnet refused

Post by rezashamdani » 2019/04/11 04:01:29

Hi,

I'm trying to send email but without using the root account, but failed as shown below;
Using root account

Code: Select all

[root@XXXXXX ~]# telnet XXXXXX.mail.protection.outlook.com 25
Trying XXX.XX.XXX.XX...
Connected to XXXXXX.mail.protection.outlook.com.
Escape character is '^]'.
220 XXXXXX.mail.protection.outlook.com Microsoft ESMTP MAIL Service ready at Thu, 11 Apr 2019 03:53:53 +0000
Using non root account

Code: Select all

[nonroot@XXXXXX ~]$ telnet XXXXXX.mail.protection.outlook.com 25
Trying XXX.XX.XXX.XX...
telnet: connect to address XXX.XX.XXX.XX: Connection refused
Trying XXX.XX.XXX.XX...
telnet: connect to address XXX.XX.XXX.XX: Connection refused
I have spent a week trying to figure it out, but still failed. We have another server with Centos6, but the non root account can use the telnet.
I have disabled the SElinux as others have suggest on similiar question, but still failed.
Please help, i have another 7 other Centos6 server need to be upgraded to Centos7 until next year, this issue might hold that back.

This is my server current configuration;
Linux howdensg2.howdensolutions.com 3.10.0-862.2.3.el7.x86_64 #1 SMP Wed May 9 18:05:47 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux.
SElinux disabled.
firewalld.service inactive.
iptables -L -n --line-numbers. without the INPUT section.

Code: Select all

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

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination
1    cpanel-dovecot-solr  all  --  0.0.0.0/0            0.0.0.0/0

Chain cpanel-dovecot-solr (1 references)
num  target     prot opt source               destination
1    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            multiport sports 8984,7984 owner UID match 988
2    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            multiport sports 8984,7984 owner UID match 0
3    REJECT     tcp  --  0.0.0.0/0            0.0.0.0/0            multiport sports 8984,7984 reject-with icmp-port-unreachable

Chain cphulk (1 references)
num  target     prot opt source               destination

User avatar
avij
Forum Moderator
Posts: 2914
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Non root user using telnet refused

Post by avij » 2019/04/11 05:34:09

I see you have CPanel installed. Whatever restriction there may be has probably been configured through CPanel. So ask them, maybe?

hunter86_bg
Posts: 1651
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: Non root user using telnet refused

Post by hunter86_bg » 2019/04/15 03:47:10

SELINUX disabled ... That's like shooting a pigeon with a tank.
Just set it to permissive and if SELINUX is the problem - you will have the info in /var/log/audit/audit.log

User avatar
TrevorH
Forum Moderator
Posts: 25046
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Non root user using telnet refused

Post by TrevorH » 2019/04/15 13:56:12

It isn't the problem. The problem is the output iptables lines that restrict output packets to only traffic that comes from source ports 8984 and 7984 for the root user or for uid 988.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply