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 08-17-2007, 08:33 AM   #1
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,113

Rep: Reputation: 57
Proxy/SQUID and POP/SMTP


I have am using SQUID/DANSGUARDIAN to block and control internet access. The problem that I am having is sending e-mail. whenever I attempt to send e-mail through the proxy I cannot. I believe it will connects to the smtp server on the ISP ok because I can download e-mails but when I try and send an e-mail out it always fails and says that it cannot communication with the SMTP host.I starts to send the e-mail with an attachment but fails at like 2 percent of the transmission. What could this be? How do I open up ports 25 and 110 so that my e-mail clients go around the proxy instead of opening up the internet and not having any control?

Last edited by metallica1973; 08-17-2007 at 11:31 AM.
 
Old 08-18-2007, 05:01 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,123

Rep: Reputation: 151Reputation: 151
I don't think going through a proxy for outbound SMTP/POP connections protects you from people accessing you from the internet more than allowing clients to connect directly. The difference in your firewall is that you allow new connections to those ports in the FORWARD chain (and established connections for the return packets), instead of the OUTPUT chain. In both cases the packets leave your box from an unprivileged port (>1024) to 25 or 110 and return to the unprivileged port.

Was there another reason you wanted to do this?
 
Old 08-19-2007, 04:55 PM   #3
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,113

Original Poster
Rep: Reputation: 57
I always get confused over the chains, this is what I understand:

INPUT - stuff coming from the outside trying to access the firewall and also to control stuff that is able to access the firewall from the LAN as well

OUTPUT - controls what goes out!

FORWARD - This is the one that is confusing the heck out of me - With this chain I guess you control what goes through the firewall and back out.

PREROUTING - controls how the packets are handled before entering the network.

POSTROUTING - how the packets are handling before leaving the network.

Please answer these questions to clarify iptables:

what is the purpose of having OUTPUT when you have a chain like FORWARD which can also control stuff going out.

If you can clarify PREROUTING as well?
 
Old 08-19-2007, 08:09 PM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,123

Rep: Reputation: 151Reputation: 151
Basically, FORWARDed packets pass through the firewall box without a local destination, ie they don't start or stop there. However, packets that go along the OUTPUT chain start on the firewall box and packets that go along the INPUT chain finish on the firewall box.

As an example, if you provide internet access to your users without a proxy server, the packets use the FORWARD chain to go through your box to the remote web server and back again. When they use your proxy server, the packets arrive at the firewall/proxy and are processed on the INPUT chain and given to your proxy server. It then sends them to the remote web server from the firewall's OUTPUT chain.

For a better explanation, there's a useful document at http://iptables-tutorial.frozentux.n...ERSINGOFTABLES that covers the path that packets take through the various chains under different scenarios.

For PREROUTING, have a look at http://iptables-tutorial.frozentux.n...REROUTINGCHAIN.

Hope that helps...

Last edited by gilead; 08-19-2007 at 08:10 PM.
 
Old 08-20-2007, 06:12 PM   #5
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,113

Original Poster
Rep: Reputation: 57
many thanks
 
  


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
configure squid proxy with microsoft proxy as a parent proxy nintykola Linux - Software 1 08-28-2007 01:38 AM
Smtp +pop asi.linux Linux - Networking 1 11-22-2006 11:23 PM
Proxy for POP and SMTP? depam Linux - Software 3 10-14-2005 10:41 AM
SQUID Proxy POP mail cant access dhammika Linux - General 2 10-03-2005 11:25 PM


All times are GMT -5. The time now is 07:15 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration