LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 05-17-2007, 08:58 AM   #1
coal-fire-ice
Member
 
Registered: Nov 2004
Location: SE England
Distribution: Debian, SUSE, Ubuntu, Slackware
Posts: 147

Rep: Reputation: 15
iptables and ESMTP protocol


i have a two machine setup where i have one machine as a mail server with ssl ESMTP on port 465, and the other machine to forward users from port 25 to port 465.

the first server - i.e. the one doing the esmtp is working fine.

i have used commands as following for the iptables bit;

Quote:
iptables -A PREROUTING -t nat -p tcp -d xxx.xxx.xxx.253 --dport 25 -j DNAT --to xxx.xxx.xxx.220:465
iptables -I FORWARD -p tcp -d xxx.xxx.xxx.253 --dport 465 -j ACCEPT
iptables -A POSTROUTING -t nat -p tcp -d xxx.xxx.xxx.220 --dport 465 -j SNAT --to xxx.xxx.xxx.253
echo 1 | tee /proc/sys/net/ipv4/ip_forward
i know that iptables itself works because i am forwarding other protocols with the same server, but on this particular one all i get is a timeout when connecting with a mail-client.

is there something about the esmtp protocol that prevents it from talking back along this to the client computer.

thanks.
 
Old 05-18-2007, 06:24 AM   #2
Centinul
Member
 
Registered: Jun 2005
Distribution: Gentoo
Posts: 552

Rep: Reputation: 30
Should:
Code:
iptables -I FORWARD -p tcp -d xxx.xxx.xxx.253 --dport 465 -j ACCEPT
be
Code:
iptables -I FORWARD -p tcp -d xxx.xxx.xxx.220 --dport 465 -j ACCEPT
Maybe I'm misunderstanding but the .253 IP has a dport of 25 in the IPTables rule above this one and I would think you would want a dport rule for .220.

HTH,

Centinul
 
Old 05-20-2007, 11:35 AM   #3
coal-fire-ice
Member
 
Registered: Nov 2004
Location: SE England
Distribution: Debian, SUSE, Ubuntu, Slackware
Posts: 147

Original Poster
Rep: Reputation: 15
im so busy at the moment that i havent had time to try it out yet, but looking at the other two ports that i had configured they use the same format of 3 rules. both the others work. -- i shall when i get a free moment try it anyway, because perhaps for the other two protocols that rule is unneccessary. i dont know.

thanks anyway.
 
Old 05-21-2007, 05:42 AM   #4
coal-fire-ice
Member
 
Registered: Nov 2004
Location: SE England
Distribution: Debian, SUSE, Ubuntu, Slackware
Posts: 147

Original Poster
Rep: Reputation: 15
no - i tried it, still the same problem
 
  


Reply



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
esmtp with gmail? -0- Linux - Software 8 11-02-2013 05:05 PM
Sendmail or Esmtp?? blizunt7 Fedora 1 08-23-2005 09:55 AM
IPTables to block IP protocol ppuru Linux - Security 3 06-26-2004 02:20 AM
Esmtp? TheGuest Linux - Newbie 1 10-31-2003 05:15 AM
esmtp error! jasonhbishop Linux - Networking 1 02-16-2002 02:22 AM

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

All times are GMT -5. The time now is 10:53 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