LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-22-2006, 06:34 AM   #1
lanczer
LQ Newbie
 
Registered: Sep 2005
Posts: 11

Rep: Reputation: 0
IMAP - Local network problem with email receive


Hi all. I have big problem and I can't find myself solution. I have hope that you can help me.

I'm behind firewall (iptables + masquerade on linux mahine) and I'm using masquerade. Few days ago my email provider change incoming mail from POP3 to IMAP and here are start problems. Because after when I change my settings in email program I can send emails but I can't receive emails. Where can be a problem. I setup in my firewall this rules (first) but still nothing:

-- CUT --
MY_IMAP_SRVR="mail.everynation.org"
DEV_NET_IP=`ifconfig $DEV_NET | grep 'inet addr:' | sed -e s/^.*inet\ addr://g -e s/\ .*$//g`
DEV_NET=ppp0
LAN_IP_RANGE="192.168.1.0/24"


if [ "$MY_IMAP_SRVR" != "" ]; then
for IMAP_SRVR in $MY_IMAP_SRVR; do

echo "Serwer IMAP: $IMAP_SRVR"

$BIN_IPT -A OUTPUT -o $DEV_NET -p TCP \
--sport 1024:65535 --dport 143 -s $DEV_NET_IP -d $IMAP_SRVR -j ACCEPT

$BIN_IPT -A INPUT -i $DEV_NET -p TCP -m state --state ESTABLISHED,RELATED \
--sport 143 --dport 1024:65535 -s $IMAP_SRVR -d $DEV_NET_IP -j ACCEPT

$BIN_IPT -A FORWARD -p TCP -s $LAN_IP_RANGE -d $IMAP_SRVR --sport 1024:65535 --dport 143 -j ACCEPT

$BIN_IPT -A FORWARD -m state --state ESTABLISHED,RELATED -p TCP -s $IMAP_SRVR -d $LAN_IP_RANGE --sport 143 --dport 1024:65535 -j ACCEPT

done;
fi

--- CUT ---

Is it ok that I can't ping mail.everynation.org ?
In my email program I have error:
IMAP: Server end connection
I'm using The Bat!).
Please help my if you need any information from my server for example:
tcpdump dst port 143
Let me know but please tell me what command I have to use.
PS. Sorry for my english ... I'm still lerning
 
Old 02-22-2006, 07:41 PM   #2
lanczer
LQ Newbie
 
Registered: Sep 2005
Posts: 11

Original Poster
Rep: Reputation: 0
I'm sure that I have bad firewall configuration. Can somebody show me how to set up all firewall rules with iptables for IMAP?? Please .
I have deafult policy set to ACCEPT.
 
  


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
Email Server Able to see Local Network but not Internet?? thiessenstuart Linux - Networking 3 08-24-2005 02:29 PM
restricting an email account to receive mails from local users only dm0nkz Linux - Security 2 09-03-2004 02:08 AM
can't receive local email? jimzipper Linux - Software 0 05-24-2004 05:58 PM
RE:Email Receive Problem norm Linux - General 0 01-08-2002 04:23 AM
Email Receive Problem norm Linux - Newbie 0 12-28-2001 01:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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