LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-04-2003, 07:43 AM   #1
diegofalciola
LQ Newbie
 
Registered: Dec 2003
Posts: 26

Rep: Reputation: 15
Angry Can't Connect to port 25


SOMEONE HELP MEEEEEEEEEEE!!

I have the sendmail daemon running at home, but noone from the outside can connect there.

I have read a lot about it, I have changed some options from sendmail.cf such as where to listen (0.0.0.0 instead of 127.0.0.1), tried to build my own cf, but nothing worked, Still cant connect to my server from the outside.

Does anybody know sth about this matter?!?!?

PLEASE HELP!
Thanks a lot!
 
Old 12-04-2003, 08:13 AM   #2
halovivek
Member
 
Registered: Aug 2003
Location: india
Distribution: ubuntu
Posts: 36

Rep: Reputation: 15
reply to ur message

could u please tell me what linux os ur working.
 
Old 12-04-2003, 08:22 AM   #3
diegofalciola
LQ Newbie
 
Registered: Dec 2003
Posts: 26

Original Poster
Rep: Reputation: 15
Re: could u please tell me what linux os ur working.

Of course.

Is a Red Hat 9 Linux
Can you help me?
THANKS!
 
Old 12-04-2003, 09:17 AM   #4
brundles
Member
 
Registered: Nov 2003
Location: UK
Distribution: SUSE 9.2
Posts: 77

Rep: Reputation: 15
Are you running a firewall? Is it configured to allow port 25 through?
 
Old 12-04-2003, 09:35 AM   #5
diegofalciola
LQ Newbie
 
Registered: Dec 2003
Posts: 26

Original Poster
Rep: Reputation: 15
Firewall

Yes, its behind a router firewall, cause server is on a maching behind NAT.
but does not even work on the server. seems to reject/drop connections to port 25, but routing to port 110 works fine, I dont know why.
I have tried, as you can read, several things, but nothing worked.

Hope sbd can help me =(

THANKS!
 
Old 12-04-2003, 10:53 AM   #6
zaphodiv
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 388

Rep: Reputation: 30
Perhaps your ISP is blocking incoming connectios to port 25?
Run tcpdump on your internet interface, do you see an incoming SYN packet to port 25 when someone trys to connect?

what rule are you using to forward the traffic to the machine behind NAT?
 
Old 12-04-2003, 11:14 AM   #7
diegofalciola
LQ Newbie
 
Registered: Dec 2003
Posts: 26

Original Poster
Rep: Reputation: 15
Firewall Roule

Is not an ISP problem, I called them and they are not blocking port 25.

I think that is an OS problem and i dont know why.
Using the tcpdump is a real mess, cause es a server. I will try to log connections.
My firewall roule to forward traffic is (refering to port 25)

iptables -A FORWARD -p tcp --dport 25 -o $INTERNAL_INTERFACE -d 192.168.1.2 -j ACCEPT
iptables -t nat -A PREROUTING -p tcp --dport 25 -i ppp0 -j DNAT --to 192.168.1.2


please, helppppppppp!!!!
 
Old 12-04-2003, 12:08 PM   #8
zaphodiv
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 388

Rep: Reputation: 30
tcpdump -n dst port 25
 
Old 12-04-2003, 12:31 PM   #9
diegofalciola
LQ Newbie
 
Registered: Dec 2003
Posts: 26

Original Poster
Rep: Reputation: 15
Angry NOT WORKINGGGG!

thanks to all, but this #$%@#$ still not working.
I have tried that "tcpdump...." with its parameters, but I receive no incoming connection to the port, seems to be blocked somewhere.

Any ideas!?

pleaseee IDEASSSSS! =$
 
Old 12-04-2003, 01:43 PM   #10
JordanH
Member
 
Registered: Oct 2003
Location: Toronto, Canada
Distribution: Ubuntu, FC3, RHEL 3-4 AS Retired: SuSE 9.1 Pro, RedHat 6-9, FC1-2
Posts: 360

Rep: Reputation: 30
Can you telnet to port 25?
 
Old 12-04-2003, 05:30 PM   #11
diegofalciola
LQ Newbie
 
Registered: Dec 2003
Posts: 26

Original Poster
Rep: Reputation: 15
Telnet

I DO can telnet to port 25, but from my own computer, or from a LAN one, but not from the outside =(((

HELPPPPP!
 
Old 12-04-2003, 07:19 PM   #12
JordanH
Member
 
Registered: Oct 2003
Location: Toronto, Canada
Distribution: Ubuntu, FC3, RHEL 3-4 AS Retired: SuSE 9.1 Pro, RedHat 6-9, FC1-2
Posts: 360

Rep: Reputation: 30
Sounds like a firewall issue. Would you care to post it so I can review what you have?

Your forwarding rules above look to be correct but there may be something before them that drops the packets.
 
Old 12-05-2003, 12:26 AM   #13
zaphodiv
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 388

Rep: Reputation: 30
Hm, tcpdump might be listening on the wrong interface, you
may have to add -i ppp0

I'm not sure about your first forwarding rule. I'm not an ip tables guru but
I don't think you need the first rule, just the DNAT rule should do it.

>iptables -A FORWARD -p tcp --dport 25 -o $INTERNAL_INTERFACE -d 192.168.1.2 -j ACCEPT

>iptables -t nat -A PREROUTING -p tcp --dport 25 -i ppp0 -j DNAT --to 192.168.1.2

When testing remember that if the forwarding is in place then having somthing listening on port 25 on the server won't work, you have to remove the forwarding rule first.
 
Old 12-05-2003, 05:05 AM   #14
diegofalciola
LQ Newbie
 
Registered: Dec 2003
Posts: 26

Original Poster
Rep: Reputation: 15
Firewall

Thanks all, but I already know that if firewall is running, redirecting port 25, it wont work on the server. To test it, the first thing i did was disable firewall and test it on the server. But didnt work. Yesterday I Changed my linux distrb. to Mandrake 9.2. Any more ideas?

I repeat, THANKS TO ALL!
 
Old 12-05-2003, 05:08 AM   #15
diegofalciola
LQ Newbie
 
Registered: Dec 2003
Posts: 26

Original Poster
Rep: Reputation: 15
Didnt work either

I've tried to connect to my new Mandrake distr. but it didnt worked either. Here there is no firewall, no rules, no ipv4, just Mandrake just installed.
The problem seems to be port 25. I have read that there it was because of an issue that they block port 25 in sendmail.cf file. But evething I've tried, didnt worked.

Any more ideas?
THANKSSSSSS
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot connect to port 25 from other machine... jdavidow Linux - Software 2 09-02-2004 06:27 AM
Cant connect on port 80 slackwarefan Linux - Networking 5 10-26-2003 04:31 AM
can connect to port 25 zonelight Linux - Software 1 09-16-2003 05:12 AM
How to connect to a switch via COM port ? CRego3D Linux - Networking 2 06-12-2003 02:11 PM
apache - cant connect. port already in use... gene_gEnie Linux - Networking 13 04-17-2002 08:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration