Beruflich Dokumente
Kultur Dokumente
How To
Ubuntu Server
Cloud Server
File Server
FTP Server
Proxy Server
Samba Server
Web Server
21
Tweet
2
reddit
Ubuntu Server Guide: Contain About Ubuntu Server Guide, Tutorial, Setup and Configuration
You are here: Home How To How to Install and Configure Lusca as Proxy Server in Ubuntu Server 12.04
150
Like
Installing and configuring of lusca on Ubuntu Server 12.04 is very easy. Now, Lusca package is available on official ubuntu repository . Lusca is recommended installed on fresh installation of ubuntu server.
Step-by-step Installing and Configuring Lusca as Proxy Server in Ubuntu Server 12.04
Step 1 . Install Ubuntu Server 12.04 and use manual partition with following partition table ( In this case I have 250 GB HDD and RAM 4 GB)
Type
Size
Location
FileSystem
Mount
Primary
30 GB
Beginning
ext4
Primary
500 MB
Beginning
ext4
/boot
Primary
8192 MB
Beginning
swap
swap
Logical
25 GB
End
btrfs
/cache-1
Logical
25 GB
End
btrfs
/cache-2
Logical
25 GB
End
btrfs
/cache-3
Logical
25 GB
End
btrfs
/cache-4
Logical
25 GB
End
btrfs
/cache-5
Logical
46 GB
End
ext4
/home
Logical
5 GB
End
ext4
/opt
Logical
5 GB
End
ext4
/srv
Logical
5 GB
End
ext4
/tmp
Logical
5 GB
End
ext4
/usr
Logical
5 GB
End
ext4
/usr/local
Step 2. Make sure your ubuntu package repositories and installed programs are up to date.
sudo apt-get update -y && sudo apt-get upgrade -y
s/[&?]correlator=[0-9]*//;
s/&cookie=[^&]*//;
s/&ga_hid=[^&]*//;
s/&ga_vid=[^&]*//;
s/&ga_sid=[^&]*//;
# s/&prev_slotnames=[^&]*//
# s/&u_his=[^&]*//;
s/&dt=[^&]*//;
s/&dtd=[^&]*//;
s/&lmt=[^&]*//;
s/(&alternate_ad_url=http%3A%2F%2F[^(%2F)]*)[^&]*/\1/;
s/(&url=http%3A%2F%2F[^(%2F)]*)[^&]*/\1/;
s/(&ref=http%3A%2F%2F[^(%2F)]*)[^&]*/\1/;
s/(&cookie=http%3A%2F%2F[^(%2F)]*)[^&]*/\1/;
s/[;&?]ord=[?0-9]*//;
s/[;&]mpvid=[^&;]*//;
s/&xpc=[^&]*//;
# yieldmanager
s/\?clickTag=[^&]*//;
s/&u=[^&]*//;
s/&slotname=[^&]*//;
s/&page_slots=[^&]*//;
}
print $x . "http://" . $1 . $2 . $y . "\n";
# ==========================================================================
# Cache high latency ads
# ==========================================================================
} elsif (m/^http:\/\/(.*?)\/(ads)\?(.*?)/) {
print $x . "http://" . $1 . "/" . $2 . "\n";
# ==========================================================================
# spicific servers starts here....
# ==========================================================================
} elsif (m/^http:\/\/(www\.ziddu\.com.*\.[^\/]{3,4})\/(.*?)/) {
print $x . "http://" . $1 . "\n";
# ==========================================================================
# cdn, varialble 1st path
# ==========================================================================
} elsif (($u =~ /filehippo/) && (m/^http:\/\/(.*?)\.(.*?)\/(.*?)\/(.*)\.([a-z0-9]{3,4})(\?.*)?/)) {
@y = ($1,$2,$4,$5);
$y[0] =~ s/[a-z0-9]{2,5}/cdn./;
print $x . "http://" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . "\n";
# ==========================================================================
# Rapidshare
# ==========================================================================
} elsif (($u =~ /rapidshare/) && (m/^http:\/\/(([A-Za-z]+[0-9-.]+)*?)([a-z]*\.[^\/]{3}\/[a-z]*\/[0-9]*)\/(.*?)\/([^\/\?\&]{4,})$/)) {
print $x . "http://cdn." . $3 . "/SQUIDINTERNAL/" . $5 . "\n";
} elsif (($u =~ /maxporn/) && (m/^http:\/\/([^\/]*?)\/(.*?)\/([^\/]*?)(\?.*)?$/)) {
print $x . "http://" . $1 . "/SQUIDINTERNAL/" . $3 . "\n";
# ==========================================================================
# like porn hub variables url and center part of the path, filename etention 3 or 4 with or without ? at the end
# ==========================================================================
} elsif (($u =~ /tube8|pornhub|xvideos/) && (m/^http:\/\/(([A-Za-z]+[0-9-.]+)*?(\.[a-z]*)?)\.([a-z]*[0-9]?\.[^\/]{3}\/[a-z]*)(.*?)((\/[a-z]*)?(\/[^\/]*){4}\.[^\/\?]{3,4})(\?.*)?$/)) {
print $x . "http://cdn." . $4 . $6 . "\n";
#...spicific servers end here.
# ==========================================================================
# Photos-X.ak.fbcdn.net where X a-z
# ==========================================================================
} elsif (m/^http:\/\/photos-[a-z].ak.fbcdn.net\/(.*)/) {
print $x . "http://photos.ak.fbcdn.net/" . $1 . "\n";
# ==========================================================================
# For yimg.com video
# ==========================================================================
} elsif (m/^http:\/\/(.*yimg.com)\/\/(.*)\/([^\/\?\&]*\/[^\/\?\&]*\.[^\/\?\&]{3,4})(\?.*)?$/) {
print $x . "http://cdn.yimg.com//" . $3 . "\n";
# ==========================================================================
# For yimg.com doubled
# ==========================================================================
} elsif (m/^http:\/\/(.*?)\.yimg\.com\/(.*?)\.yimg\.com\/(.*?)\?(.*)/) {
print $x . "http://cdn.yimg.com/" . $3 . "\n";
# ==========================================================================
# For yimg.com with &sig=
# ==========================================================================
} elsif (m/^http:\/\/(.*?)\.yimg\.com\/(.*)/) {
@y = ($1,$2);
$y[0] =~ s/[a-z]+[0-9]+/cdn/;
$y[1] =~ s/&sig=.*//;
print $x . "http://" . $y[0] . ".yimg.com/" . $y[1] . "\n";
# ==========================================================================
# Youjizz. We use only domain and filename
# ==========================================================================
} elsif (($u =~ /media[0-9]{2,5}\.youjizz/) && (m/^http:\/\/(.*)(\.[^\.\-]*?\..*?)\/(.*)\/([^\/\?\&]*)\.([^\/\?\&]{3,4})((\?|\%).*)?$/)) {
@y = ($1,$2,$4,$5);
$y[0] =~ s/(([a-zA-A]+[0-9]+(-[a-zA-Z])?$)|(.*cdn.*)|(.*cache.*))/cdn/;
print $x . "http://" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . "\n";
# ==========================================================================
# General purpose for cdn servers. add above your specific servers.
# ==========================================================================
} elsif (m/^http:\/\/([0-9.]*?)\/\/(.*?)\.(.*)\?(.*?)/) {
print $x . "http://squid-cdn-url//" . $2 . "." . $3 . "\n";
# ==========================================================================
# Generic http://variable.domain.com/path/filename."ex" "ext" or "exte" with or withour "? or %"
# ==========================================================================
} elsif (m/^http:\/\/(.*)(\.[^\.\-]*?\..*?)\/(.*)\.([^\/\?\&]{2,4})((\?|\%).*)?$/) {
@y = ($1,$2,$3,$4);
$y[0] =~ s/(([a-zA-A]+[0-9]+(-[a-zA-Z])?$)|(.*cdn.*)|(.*cache.*))/cdn/;
print $x . "http://" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . "\n";
# ==========================================================================
# generic http://variable.domain.com/...
# ==========================================================================
} elsif (m/^http:\/\/(([A-Za-z]+[0-9-]+)*?|.*cdn.*|.*cache.*)\.(.*?)\.(.*?)\/(.*)$/) {
print $x . "http://cdn." . $3 . "." . $4 . "/" . $5 . "\n";
# ==========================================================================
# spicific extention that ends with ?
# ==========================================================================
} elsif (m/^http:\/\/(.*?)\/(.*?)\.(jp(e?g|e|2)|gif|png|tiff?|bmp|ico|flv|on2)(.*)/) {
print $x . "http://" . $1 . "/" . $2 . "." . $3 . "\n";
# ==========================================================================
# all that ends with ;
# ==========================================================================
} elsif (m/^http:\/\/(.*?)\/(.*?)\;(.*)/) {
print $x . "http://" . $1 . "/" . $2 . "\n";
} else {
print $x . $_ . "sucks\n";
}
}
#=================================EOF=======================================
or
sudo service lusca restart
34 comments
Best
mciezell
can somebody help me my proxy running then i just can open httpps how to set nat on rb 750. i cant open broswings
Anjela
Telkomspeedy??
ISP Telkomspeedy currently experiencing disruption. Try to change the DNS Server with Google DNS or OpenDNS
Anjela
Anjela
hmm,
i'm installing ubuntu server 12.10, not 12.04 ..
now, i'm installing ubuntu server 12.04 is run...
Yadi aja
Robi Rusman
Alicya Grace
High Performance Cache HIT HTTPS Proxy Lusca on Ubuntu Server 12.04
Sumber: Mr.Eko Apriadi - http://mr-ekoapriadi.blogspot....
Alicya Grace
Alicya Grace
surabaya
Siraj Muneer
Dear All,
I am getting following error when typing "lusca -d1"
/cache-1//swap.state: (13) Permission denied
FATAL: storeAufsDirOpenSwapLog: Failed to open swap log.
Squid Cache (Version LUSCA_HEAD-r14809): Terminated abnormally.
CPU Usage: 0.012 seconds = 0.004 user + 0.008 sys
Maximum Resident Size: 16160 KB
Page faults with physical i/o: 0
(squid)[0x80b4a84]
(squid)[0x80b543f]
(squid)[0x80c25e7]
boypeace
Ali
John Uchli
Help me, i have HDD 500 GB and RAM 1 GB. How manual partition with following partition table., :(
Wijaya Kusuma
Previous post: How to Install ZpanelX Web Hosting Control Panel on Ubuntu Server 12.04
Next post: How to Setup Chat Server Using Openfire 3.7.1 in Ubuntu Server 12.10
Recent Posts
How to Filter HTTPS Traffic with Squid 3 on Ubuntu Server 13.10
How to Install and Configure MySecureShell in Ubuntu Server Edition
How to Install Ajenti in Ubuntu Server 13.10/13.04/12.10/12.04
How to Setup PostgreSQL Database Server and PhpPgAdmin in Ubuntu Server 13.10
Ubuntu Server 13.10 Saucy Salamander Installation Guide
Ubuntu News
Simple Screen Recorder: Desktop Screen Recorder for Linux based on Qt
How to Install XAMPP 1.8.3 for Linux in Ubuntu Desktop
Linux Deepin 2013 Released Come with Facial Recognition Login
How to Make Cinnamon 2.0 Available on Ubuntu Desktop
How to Add the Enlightenment 17 Desktop to Ubuntu 13.10
Follow @ubuntuguide
Most Read
How to Install and Configure Lusca as Proxy Server in Ubuntu Server 12.04
How to Setup OwnCloud Server 5 with SSL Connection
How to Install and Configure Proxy Server with Squid3 on Ubuntu Server 12.04 LTS
Tags
Ajenti
Apache Apache2 Cache Cloud Computing Control Panel Database Dropbox FastCGI File Server FTP Server Hosting How To HTTP Install Installation Guide LAMP Server Linux Monitoring MySQL Nginx Oracle ownCloud OwnCloud 5 PHP Precise Proxy Server
Samba Server Server Server Adminstration Squid3 SSL Sync Transparent Proxy TSL Ubuntu
Server Wordpress
Recent Comments
Nico on Manual Disk Partitioning Guide for Ubuntu Server Edition
Rick Shoop on Ubuntu Server 13.10 Saucy Salamander Installation Guide
MrWormo on How to Install Ajenti in Ubuntu Server 13.10/13.04/12.10/12.04
frame45 on How to Install Ajenti in Ubuntu Server 13.10/13.04/12.10/12.04
Robi Rusman on How to Install and Configure Lusca as Proxy Server in Ubuntu Server 12.04
Pages
About Us
Privacy Policy
Sitemap
Search for:
Copyright 2014 Ubuntu Server Guide
12.04 Ubuntu Server 12.10 Ubuntu Server 13.04 Ubuntu Server 13.10 vsftpd
Webmin
Web