access external mail ( pop using outlook) with a linux gateway

i have a cable modem that is connected to a linux machine ( the gateway). I configured squid on that machine and everything works properly, except i cant access my external mail using outllok or other mail client.

i appreciate any help,
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Squid can't proxy POP, IMAP, or SMTP traffic. To allow those you need to configure a NAT'ing firewall on the Linux box to allow direct Internet access from the inside clients.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
if you are not familiar with linux iptables to setup NAT use firestarter you can get it from the following url it helps you to configure NAT using an easy GUI.

cabirAuthor Commented:
I´d like to configure my linux box to allow POP, IMAP or SMTP traffic. I found a lot of iptables rules and I can now access POP, but with it I can´t surf the web.

I think the firewall must have a rule allowing SQUID, if so, how is that?

thanks for the tips,
Learn Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Gabriel OrozcoSolution ArchitectCommented:
once you have setup your linux box as NAT with iptables, you should be able to surf the web, provided you have correctly specified the DNS' on your client.

if you want IPTables still acelerating your connection, you will need

a) to maintain the browser setup specifying the proxy data


b) to setup a transparent proxy in iptables and in squid.

for squid transparent proxy, add these lines to squid.conf:

# Para  el proxy transparente
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

for iptables to redirect any web access to squid:
(use the example and fill your own network)
$ipt -t nat -A PREROUTING -p tcp -s $LAN  --dport 80 -j REDIRECT --to-port 3128
don't forget to add correct dns data on your clients.
to setup a dns-cache on your linux box, just start named. then you can use the ip of your linux box as DNS.
if you are using a redhat like distribution, use:

chkconfig --level 345 named on
cabirAuthor Commented:
I could set up my linux box to allow mail and web access. I have one last problem, the default gateway of my network is a windows server 2003, from that machine i can access everything, but from any client on the network i only access web ( through squid).

Gabriel OrozcoSolution ArchitectCommented:
well you need to edit routes and give the route to netmask to the linux box on your windows gateway
cabirAuthor Commented:
the clients of my dhcp server ( a ws2003 machine) can´t get the default gateway ip. it only get ip address and netmask, but no default gateway.
when i set up that information manually everything works properly. what to do to clients get the default gateway value?...

Gabriel OrozcoSolution ArchitectCommented:

add this to your subnet definition

# The Gateway for the local network
option  routers ip.of.your.router;

and maybe you'll need this too:

option domain-name-servers ip.of.your.dns;
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.