LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-13-2006, 12:15 AM   #1
Niceman2005
Member
 
Registered: Nov 2004
Distribution: Fedora Core 2
Posts: 330

Rep: Reputation: 30
Webmail behind the firewall couldn't be access


Dear friends,

I have a webserver hosting a webmail. I wrote a fireall script as follows: (only included the core)

$IPT -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPT -A INPUT -p tcp -m state --state NEW --dport 80 -j ACCEPT
$IPT -A INPUT -j DROP

#OUTPUT
$IPT -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPT -A OUTPUT -j DROP


In the firewall host, I am hosting a webmail and my company website.

The script works for accessing my company's website, but when I tried to login to the webmail. It says cannot connect to the imap mail server.
I could reach the login screen but cannot proceed further than that.

by adding the sentence:
$IPT -A OUTPUT -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT

Then it will work allowing me to access the webmail. But I am curious what is actually the cause such as which port did I left out that forbids the login into the webmail.

please direct me, if you know what I have left out.

thanks for taking time helping!

Regards
Fong
 
Old 01-13-2006, 07:41 AM   #2
Sir_Limpalot
LQ Newbie
 
Registered: Jan 2006
Location: Norway
Distribution: Debian
Posts: 18

Rep: Reputation: 0
As long as you don't have the IMAP-server on the same machine as the web-server you need to open for connections to it.
You only allow connections out that are related or established, when the webmail tries to log into the imap-server this is a new connection.

iptables -I OUTPUT -p tcp --dport 143 -d <the ip of the imap-server> -j ACCEPT

Should do the trick

Cheers
 
Old 01-13-2006, 06:08 PM   #3
Niceman2005
Member
 
Registered: Nov 2004
Distribution: Fedora Core 2
Posts: 330

Original Poster
Rep: Reputation: 30
thanks a lot

Oh , thats great. port 143. thanks a lot friend.
 
  


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
Squirrelmail - Webmail - Firewall Davidw20 Linux - General 3 08-05-2005 07:36 AM
Access trhough firewall tpe Linux - Networking 2 04-25-2005 04:39 AM
Firewall (with selective access) KETrel Linux - Security 7 10-06-2004 12:05 PM
Samba and firewall access Jim Miller Linux - Security 1 08-03-2003 07:34 PM
ip-access through redhat firewall niehls Linux - Networking 7 03-24-2003 10:20 AM

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

All times are GMT -5. The time now is 11:36 PM.

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