Problem:
I noticed that I can’t telnet into my servers port 25 or 110 from the outside.
Step 1:
You need the “sendmail” package and the “imap” pacakges installed on linux.
Step 2:
Run the following to check for these packages from root.
rpm -q imap
rpm -q sendmail
Step 3:
If you do not have these packages installed you will need to install them from CD#3:
mount /mnt/cdrom
rpm -i /mnt/cdrom/RedHat/RPMS/sendmail-cf-8.12.8-4.i386.rpm
rpm -i /mnt/cdrom/RedHat/RPMS/imap-2001a-18.i386.rpm
Step4:
You will need to open the ports from the outside if you are behind a router or not. If you have router you will need to NAT ( redirect for gaming ) them with the routers webaccess to the linux ip.
You don’t want to modify the line in sendmail.mc that imposes the localhost restriction, but rather you want to comment out that line. To do that you’d change:
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
to:
dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
and then build a new sendmail.cf with make. Sendmail must be restarted for the change to take effect.
Step5:
The ports 110 and 25 now should be opened. To test this do the following:
This should give you a connection to the SMTP server
telnet hostname 25
This should give you a connection to the POP server
telnet hostname 110
The when you type the following this will indicate that it accpets connections from any IP from the outside:
Type
netstat -an | grep 25
The result
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
Next type
netstat -an | grep 110
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN
Note : This will not relay unless it is turned on…
Enjoy…![]()