Kamis, 05 Juli 2007

Installing Proxy Server on Debian...

To the point...

Install squid package!
-apt-get install squid
edit file /etc/squid.conf with your favorite text editor.
-vi /etc/squid.conf

This is importance:
http_port 8080/3128 or it's up to you the importance

Find the following directives, uncomment
them, and change them to the appropriate values:
· httpd_accel_host virtual
· httpd_accel_port 80
· httpd_accel_with_proxy on
· httpd_accel_uses_host_header on

And find again acccelerator.....
Finally, look at the http_access directive. The default is usually ``http_access deny all''. This will prevent
anyone from accessing squid. For now, you can change this to ``http_access allow all'', but once it is working,
you will probably want to read the directions on ACLs (Access Control Lists), and setup the cache such that
only people on your local network (or whatever) can access the cache. This may seem silly, but you should
put some kind of restrictions on access to your cache. People behind filtering firewalls (such as porn filters, or
filters in nations where speech is not very free) often ``hijack'' onto wide open proxies and eat up your
bandwidth.

After finish editing, save and exit!...
:wq!

And you should give some rule in firewall to redirect connection http to squid port.
Like this:
-iptables -t nat -I PREROUTING -s (your ip network/subnetmask) -d 0.0.0.0/0 -p tcp --dport 80 -j REDIRECT --to-port 3128(it's up to you, as you configured)
example:
-iptables -t nat -I PREROUTING -s 172.11.0.32/27 -d 0.0.0.0/0 -p tcp --dport 80 -j REDIRECT --to-port 3128.

And now...you may run the squid for the first time...(just once)
-squid -z
and then start the proxy service!
/etc/init.d/squid start
Ok, now you have installed and configuring your PC as transparent proxy server.
....Good Luck...
AnD happy with your proxy machine.... :)


Best Regard's....
Malx


1 komentar:

Anonim mengatakan...

bisa ajarin saya ga mas?