Networking Forums

Networking Forums > Computer Networking > Linux Networking > Squid and simple iptables

Reply
Thread Tools Display Modes

Squid and simple iptables

 
 
Kemton
Guest
Posts: n/a

 
      10-13-2003, 12:23 AM
I can't get my iptables right to allow squid to work properly. The
server in question doesn't perform many actions, just mail and squid.
All internal traffic coming to it gets NAT'd by a router to appear to
come from 192.168.0.250. My firewall rules are:

[root@mail squid]# iptables -L
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp
dpt:smtp
ACCEPT all -- anywhere anywhere state
RELATED,ESTABLISHED
ACCEPT all -- localhost anywhere
ACCEPT all -- 192.168.0.250 anywhere

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

It always takes a long time with an iptables -L to list the last rule,
with 192.168.0.250. Any idea why this is happening, and can anybody
see anything wrong with this?
 
Reply With Quote
 
 
 
 
Leon The Peon
Guest
Posts: n/a

 
      10-13-2003, 03:02 AM

"Kemton" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> I can't get my iptables right to allow squid to work properly. The
> server in question doesn't perform many actions, just mail and squid.
> All internal traffic coming to it gets NAT'd by a router to appear to
> come from 192.168.0.250. My firewall rules are:
>
> [root@mail squid]# iptables -L
> Chain INPUT (policy DROP)
> target prot opt source destination
> ACCEPT tcp -- anywhere anywhere tcp
> dpt:smtp


Mail will work for receiving

But not for sending.



> ACCEPT all -- anywhere anywhere state
> RELATED,ESTABLISHED


This one allows some IP session that is established to continue. but no sign
of any rule to allow establishing a session.


> ACCEPT all -- localhost anywhere
> ACCEPT all -- 192.168.0.250 anywhere


These only allow the local computers to send packets to the server.
They dont allow the rest of the interent to send packets to the server.


> Chain FORWARD (policy ACCEPT)
> target prot opt source destination
>
> Chain OUTPUT (policy ACCEPT)
> target prot opt source destination



The only possibility you have for running squid on the same machine is to
prevent SYN packets to your computer.
Allow everything else but disallow syn packets, except to the mail server.


> It always takes a long time with an iptables -L to list the last rule,
> with 192.168.0.250. Any idea why this is happening, and can anybody
> see anything wrong with this?


Its trying to do a /etc/hosts, DNS look up and it takes a while to fail.
put the address in /etc/hosts.




 
Reply With Quote
 
Kemton
Guest
Posts: n/a

 
      10-14-2003, 12:31 AM
Thank you for the answers so far. Are there any recommendations for
iptables rules from scratch for the following box function:

1. Allow incoming mail, sending and receiving.
2. Allow all traffic from the 192.168.0.250 address, sending and
receiving.
3. Allow all traffic to/from localhost


"Leon The Peon" <(E-Mail Removed)> wrote in message news:<bmd4k8$gvs$(E-Mail Removed)>...
> "Kemton" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) om...
> > I can't get my iptables right to allow squid to work properly. The
> > server in question doesn't perform many actions, just mail and squid.
> > All internal traffic coming to it gets NAT'd by a router to appear to
> > come from 192.168.0.250. My firewall rules are:
> >
> > [root@mail squid]# iptables -L
> > Chain INPUT (policy DROP)
> > target prot opt source destination
> > ACCEPT tcp -- anywhere anywhere tcp
> > dpt:smtp

>
> Mail will work for receiving
>
> But not for sending.
>
>
>
> > ACCEPT all -- anywhere anywhere state
> > RELATED,ESTABLISHED

>
> This one allows some IP session that is established to continue. but no sign
> of any rule to allow establishing a session.
>
>
> > ACCEPT all -- localhost anywhere
> > ACCEPT all -- 192.168.0.250 anywhere

>
> These only allow the local computers to send packets to the server.
> They dont allow the rest of the interent to send packets to the server.
>
>
> > Chain FORWARD (policy ACCEPT)
> > target prot opt source destination
> >
> > Chain OUTPUT (policy ACCEPT)
> > target prot opt source destination

>
>
> The only possibility you have for running squid on the same machine is to
> prevent SYN packets to your computer.
> Allow everything else but disallow syn packets, except to the mail server.
>
>
> > It always takes a long time with an iptables -L to list the last rule,
> > with 192.168.0.250. Any idea why this is happening, and can anybody
> > see anything wrong with this?

>
> Its trying to do a /etc/hosts, DNS look up and it takes a while to fail.
> put the address in /etc/hosts.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
transparent proxy - iptables+ squid+2 routers Igor Linux Networking 3 10-13-2005 03:54 AM
Wireless + Fedora + IPTables + Squid + DansGuardian Michael Cox Linux Networking 1 05-26-2004 03:12 AM
iptables+dhcp+squid+User_AUTHENTICATION TheElectron707 Linux Networking 0 02-06-2004 04:19 PM
AIM Express, squid, iptables configuration Mike Linux Networking 1 07-05-2003 03:34 PM
Re: trnasparent proxy with squid & iptables Florian St. Linux Networking 4 07-03-2003 08:49 PM



1 2 3 4 5 6 7 8 9 10 11