Building Of A Proxy Server + Ubuntu Mikrotik 10:10 - Part 1

Previously, I say thank you so much for your permission and support of Rizzal Bang Bang menbagi Bastian for science in the blog inil After finally battered oprek Mikrotik Proxy + Ubuntu Server 10.10 (32/64bit) is finished results are incredible as well dah .. . Ok with no strings attached .. trigger cigarettes run out, the following preparations:


IP topology above is not written by authors only, therefore you are free to change the IP and customize to your IP !!!!!


If you are not thinking about the Ubuntu CD Ubuntu Server 10:10 please download below:


64 Bit 32 Bit Download Download and burn to CD




1. Prepare the Ubuntu Server CD 10.10 (32 Bit or 64 Bit) - Advice for Beginners 32 Bit


2. 1 CPU Intel Pentium 4 / AMD, 2 GB of RAM minimum, 160GB HD-minimal, 1 NIC, CDROM


3. Cable Cross


4 MikroTik which can already internet


Next follow the step by step installation of ubuntu (Caution, caution in the installation, incorrect installation FAILED proxy !!!!)


10:10 UBUNTU 64 bit Btrfs


Step by step (CPU Proxy jgn in relation to the Internet first when installing, so that the process is faster)


1. INSERT INTO UBUNTU CD AND CDROM boot choose to cdroom,
2. Choose the language bahasa (enter)
3. Select install ubuntu server (enter)
4. Press enter to choose langguage bahasa
5. Select the united states
6. Click no to detect the keyboard layout?
7. USA Click on the Ubuntu installer main menu
8. USA Click on the keyboard layout
9. Click continue to configure the network
10. Select the network manually configure the contents of the ip address 192.168.11.11 dg enter select continue
11. Netmask 255.255.255.0 enter select continue
12. Gateway 192.168.11.1 continue click continue
13. Name server addresses 192.168.11.1 enter select continue
14. Hotsnama: dg contents proxyku continue continue select enter
15. Domain name: the blank only, select continue enter
16. On the Configure the clok choose select from the list continues to search worldwide jakarta (adjust your location) continues to enter
17. On the menu select manually partition the disk
18. We delete the old partition first:
19. Select the partition continues to enter his select delete the partion (repeat this command for all partitions reply left)
20. When you have finished select Guided partitioning, then select manually navigate to the FREE SPACE (enter),
21. Select Create new partition (enter)
22. New partition size content of 256 mb (select continue and enter), select Primary (enter), select the Beginning (enter), to use as select EXT4 (enter) at the Mount Point select / boot (enter), pd mount option select [*] noatime (select continue and enter), the fox becomes a bootable flag on TDK IF HIS STATUS CHANGED JUST IGNORE then select done setting up the partition
23. New partition size of 20 gb (select continue and enter), select Primary (enter), select the Beginning (enter), to use as select EXT4 (enter) at the Mount Point select / (enter), pd mount option select [*] noatime (select continue and enter), then select done setting up the partition
24. Navigate to the FREE SPACE (enter), select Create new partition (enter) the contents of the new partition size 4 gb (2x size of RAM) select continue and enter, select Primary (enter), select the Beginning (enter), to use as select the swap area ( enter), then Select done setting up the partition
25. Navigate to the FREE SPACE (enter), select Create new partition (enter) the new partition size of all the remaining contents of the hard drive (select continue and enter), select Primary (enter), select the Beginning (enter), to use as select Btrfs or Reinsfers (enter )


NOTE:


Btrfs to 64bit


Reinfers for 32bit


manually enter the Moun point for the / cache, pd mount option select [*] noatime and realtime then Select continue and done setting up the partition
26. Then select finish partitioning and write changes to disk, write the changes to disk select yes
27. the full name for the new user content dg proxyku, continue to continue & enter
28. Username for your account on the content of dg proxyku, continue to continue & enter
29. on a user's password for the new content dg proxyku, continue to continue & enter
30. to re-enter password to verify the contents of dg proxyku, continue to continue & enter
31. to use weak passwords select yes
32. to encrypt your home directory select no
33. the HTTP proxy information blank ONLY
34. 43% on apt config press enter, also in 81% press enter select no automatic updates
35.pada choose software to install select the OpenSSH server select continus pd finish the installation and reboot, grab the Ubuntu CD, 1st Boot returned to the HDD


further


# Login dg proxyku
# Password proxyku
# Sudo su -
# Content proxyku


if you want to login as root every reboot ubuntu follow these steps:
# Type passwd
Enter new UNIX password # dg proxyku contents
# Retype new UNIX password proxyku contents


The following step was remote Mikrotik Winbox, new terminals, fill his ip in the usual way:


ip address add address 192.168.11.1/24 interface = ether3


CROSS connect the cable to the CPU and connect to mikrotik port 3
check the ping of each cpu and mikrotik ping 192.168.11.11 and ping 192.168.11.1
if they reply and ping from DNS, if the reply is ready to install the proxy


If not reply and ubuntu reboot mikrotik, jik not reply also check the IP is wrong If not reply CABLE One kaleeeeeeeee (pake CROSS bozzz)


Install Package antecedent need:


# Sudo apt-get update
# Sudo apt-get install squid squid-cgi squidclient
# Sudo apt-get install gcc
# Sudo apt-get install build-essential
# Sudo apt-get install sharutils
# Sudo apt-get install ccze
# Sudo apt-get install-dev libzip
# Sudo apt-get install automake1.9


Download Squid 7 Stable 9 on the menu this blog


or you download squid-2.7.STABLE9 then you copied to the folder / root using WinSCP in ubuntu and continue:


# Tar xvf squid-2.7.STABLE9 + patch.tar.gz
# Cd squid-2.7.STABLE9


-> Then you compile the proxy by using the compiler script in the tutorial section to 2.


OK until here first ... next First Stage is compiling the kernel and setting the SQUID, sysctl.conf in the Proxy, as well as NAT, mangle, simple queue, queue tree, queue TYPE in Mikrotik. But First patient ... heehehhe sure the steps above you make it through his Success ... If you let me wish deh ..

Squid 2.7 Patch Update Stable9 overcome parse_refreshpattern

Previous authors have praised the visitors who managed proxy server ubuntu mengoprek 10.10 and managed to add a new disk partition to store the cache. From the comments of the visitors are asked to have a problem parse_refreshpattern: Unknown option when running the command / etc / init.d / squid restart. The authors understand that despite the lack of squid works well and can keep the cache as well. However, there is sempura if there is a small problem. Therefore, the authors of the following messages is a solution to ubuntu squid proxy fully and optimally. Ok just follow these steps ... ...

Please download first squid2.7STABLE9PATCH.tar.gz download menu in this blog, you must rename the copy squid2.7STABLE9.tar.gz in / root Ubuntu Server


2. Remote Ubuntu with putty, stop squid # / etc / init.d / squid stop

3. Retrieved squid2.7STABLE9.tar.gz

# Tar xvf squid-2.7.STABLE9.tar.gz

# Squid 2.7.STABLE9-Cd

4. to translate the heart of the proxy machine

You can get here ->: kernel compilation

Open to select all, copy and paste Ubuntu, right click and enter ... wait for it to finish

follows:

# Make a

# Make install

After a successful compile, download squid.conf menu updated this blog, open WinSCP, the file / etc / squid / squid.conf to edit, and delete all the contents and replace it with, UPDATE, and re-adjust the cache directory ACLs according to the above settings.

Then open and edit squid.conf.pl add the following script:

================================================== =====

http_access deny dontrewrite

http_access deny! GetMethod

http_access allow store_rewrite_list_domain_CDN

http_access allow store_rewrite_list

http_access allow store_rewrite_list_domain

http_access allow store_rewrite_list_path

localhost http_access allow manager

http_access deny manager

http_access allow purge localhost

http_access deny purge

http_access deny! Security doors

Connect http_access deny! sslports

http_access deny all

================================================== =============

srcript you delete and inflicted the above script and then save the file squid.conf and continue squid.conf.pl

# Sudo chmod + x / etc / init.d / squid

# / Etc / init.d / squid stop

customize the cache folder

# Chown proxyku: proxyku / cache1

# Chown proxyku: proxyku / cache2

# Chmod 777 / cache1

# Chmod 777 / cache2

# Chown proxy: proxy / etc / squid / storeurl.pl

# Chmod 777 / etc / squid / storeurl.pl

# Squid-f / etc / squid / squid.conf-z

# / Etc / init.d / squid restart

if you can not parse_refreshpattern: Unknown option .... Congratulations, you've got the squid patch 2.7Stable9 success.

You can view the client log HIT type the command:

tail-f / var / log / squid / access.log | ccze

tail-f / var / log / squid / access.log | grep HIT

NOTE: This update squid.conf configuration is the setting for the dinamyc content. The experience of the author, at the time of complete customer access, 1 (one) day and can afford to store more than 2 GB of hard disk cache to the proxy server, then install the hard drive to a large cache .