All of lore.kernel.org
 help / color / mirror / Atom feed
* masquerading and access
@ 2002-10-30  7:02 Payal
  2002-10-30  9:24 ` Antony Stone
  2002-10-30  9:36 ` R. Sterenborg
  0 siblings, 2 replies; 4+ messages in thread
From: Payal @ 2002-10-30  7:02 UTC (permalink / raw)
  To: netfilter

Hi,
	I want to implement a masquerading proxy ( I hope I am clear
here ) on a network of 50 machines. Out of this only 25 machines say
192.168.0.1-192.168.0.25 need to connect to net. Squid will be the
caching proxy.
I just want to know whether I have to put a rule as,

1. #iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Then I redirect all request to port 80 to port 3128 of squid
Then I make necessary acl changes in squid.conf to allow only
192.168.0.1-192.168.0.25.
And then for ftp I put  iptables ACCEPT rules for these ips in iptables ruleset
and block rest.
				OR

2. #iptables -t nat -A POSTROUTING -s 192.168.0.1/xx -j MASQUERADE
Will this rule do? Also what to put in place of xx for allowing
192.168.0.1-192.168.0.25. I also I will have to put port redirection of
80 to 3128 and use squid access list.

Can someone tell me which of the solution should I implement and if they
are right.

Thanks a lot in advance and bye.
-Payal






^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: masquerading and access
@ 2002-10-30 17:42 Payal
  0 siblings, 0 replies; 4+ messages in thread
From: Payal @ 2002-10-30 17:42 UTC (permalink / raw)
  To: netfilter

Hi,
Thanks a lot for the mails. Well, my requirement is simple. I have one
Linux box (connected to net) and say 50 Windows clients. On the Linux box I will put squid,
qmail, dnscache. Now out of these 50 email clients only some i.e
192.168.0.1-192.168.0.25 need to use net directly i.e. browse sites and
ftp outside & use SMTP. The rest just need to use the SMTP for email.
Please do not have a picture of a complex setup in mind.

In short,
192.168.0.1-192.168.0.25 --> www, ftp and smtp(which is on say 192.168.0.1)
192.168.0.26-192.168.0.50 --> just use SMTP on 192.168.0.1 to send mails
outside, but no strict other internet access.

Now what rules should I put? I want to use squid as http proxy.
I am still unable to get how you figure what 192.168.0.0/27 thing. I can
get some help here for this specific problem, but it might cause a
problem if I were to increase/decrease the above ip range a bit. So,
please tell me how to calculate this.

Please also do tell the rules I have to put for masquerading (I need it
for ftp atleast, right?)

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
This is the box which runs squid and is connected to internet.
Any help here please? I think this rule will masquerade for all
machines, then I have to use DROP/REJECT for machines 192.168.0.26
onwards. Is there any better and less clumsy way?

Thanks a lot and bye.
With regards.
-Payal


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-10-30 17:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-30  7:02 masquerading and access Payal
2002-10-30  9:24 ` Antony Stone
2002-10-30  9:36 ` R. Sterenborg
  -- strict thread matches above, loose matches on Subject: below --
2002-10-30 17:42 Payal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.