Ubuntu / Debian VPS එකකින් Squid Proxy සර්වර් එකක් හදමු

Nadun26

Well-known member
  • Apr 27, 2015
    14,141
    12,678
    113
    38
    Ubuntu / Debian VPS එකකින් Squid Proxy සර්වර් එකක් හදමු

    Ubuntu / Debian VPS එකකින් Squid Port Proxy සර්වර් එකක් හදමු

    ඔයාලා Internet එකේදී දැකලා ඇතිනේ Proxies තියෙනවා එක එක විදියේ. ඔය තහනම් කළ සයිට් වලට යන්න IP එක හංගන්න වගේ නොයෙකුත් වැඩ වලට Proxies බාවිතා කරනවානේ. මේ විදියේ free දෙන Proxies විශාල ප්‍රමානයක් ඔයාලට අන්තර්ජාලයෙන් හොයාගන්න පුලුවන්. මම අද ඔයාලට කියලා දෙන්නේ මේ විදියේ Proxies එකක් Ubuntu / Debian VPS එකකින් නිර්මාණය කර ගන්නා ආකාරය පිලිබදවයි.

    මුලින්ම ඔය කොහෙන් හරි හොද තැනකින් 1Gb විතර RAM තියෙන හොද Linux Vps එකක් මිල දී ගන්න. සමහර VPS වල Proxy සර්වර් හදන්න දෙන්නේ නැහැ ඒක නිසා ගන්න තැනින් අහලාම ගන්නවනම් තමයි හොද

    VPS එකක් ගත්තා නම් එකේ Ubuntu හෝ Debian OS දෙකෙන් එකක් Install කරගන්න. කැමති සංස්කරණයක් (මමනම් බාවිතා කලේ Ubuntu 64Bit 12.04 LTS මෙහෙයුම් පද්ධතිය)

    OS එක Install කර ගත්තට පස්සේ SSH වලින් VPS එකේ root එකට ලොග් වෙන්න. - Windows පරිගණකයකින් නම් ssh ලොග් වෙන්න Putty බාවිතා කරන්න මෙතනින් එය Download කරගන්න. http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
    Putty එකේ Hostname එකට ඔබේ VPS එකේ IP එක දීලා Open ඔබන්න. එතකොට login කියලා වැටෙයි Windows වල CMD එක වගේ එකක් ඇවිල්ලා. එතනට root කියලා type කරලා Enter ඔබන්න. එතකොට Password එක අහනවා ඒකට ඔබේ VPS එකේ root Password එක Type කරලා Enter ඔබන්න.

    Linux පරිගනකයක් නම් කී බෝඩ් එකේ CTRL + Alt + T ඔබලා Terminal එක අරන් එකේ මෙහෙම Type කරන්න. ssh root@ඔබේ vps එකේ Ip එක (උදා ssh [email protected]) කරලා Enter ඔබන්න. එතකොට Password එක අහයි එකට ඔබේ root Password එක ගහලා Enter එබුවාම root එකට ලොග් වෙයි.

    ඔබේ VPS එකේ System එක update කරගන්න පහත Command එක මුලින් ම Type කරලා Enter ඔබන්න.

    apt-get update

    ඊළගට Squid3 මෘදුකාංගය Install කරන්න පහත Command එක Type කරලා Enter ඔබන්න. ( Squid3 මෘදුකාංගයෙන් තමයි Proxy සර්වර් එක හදන්නේ)

    apt-get install squid3

    ඕක Type කරලා Enter එබුවට පස්සේ අහයි Y/N කියලා ඒකට Y Type කරලා Enter ඔබන්න.

    ඊළගට අපිට /etc/squid3/squid.conf ගොනුව Edit කරගන්න සිදු වෙනවා. එකට පහත Command එක Type කරලා Enter ඔබන්න

    HTML:
    nano /etc/squid3/squid.conf

    squid.conf ගොනුවේ ඇතුලේ තියෙන සියල්ලම මකලා දාලා පහත තියෙන ටික ඒකට දාලා Save කරගන්න.

    acl SSL_ports port 443
    acl Safe_ports port 80 # http
    acl Safe_ports port 21 # ftp
    acl Safe_ports port 443 # https
    acl Safe_ports port 70 # gopher
    acl Safe_ports port 210 # wais
    acl Safe_ports port 1025-65535 # unregistered ports
    acl Safe_ports port 280 # http-mgmt
    acl Safe_ports port 488 # gss-http
    acl Safe_ports port 591 # filemaker
    acl Safe_ports port 777 # multiling http
    acl CONNECT method CONNECT
    acl manager proto cache_object
    acl localhost src 127.0.0.1/32 ::1
    acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
    http_access allow manager localhost
    http_access allow manager
    http_access allow !Safe_ports
    http_access allow CONNECT !SSL_ports
    http_access allow localhost
    http_access allow all
    http_port 7676 transparent
    forwarded_for off
    request_header_access Allow allow all
    request_header_access Authorization allow all
    request_header_access WWW-Authenticate allow all
    request_header_access Proxy-Authorization allow all
    request_header_access Proxy-Authenticate allow all
    request_header_access Cache-Control allow all
    request_header_access Content-Encoding allow all
    request_header_access Content-Length allow all
    request_header_access Content-Type allow all
    request_header_access Date allow all
    request_header_access Expires allow all
    request_header_access Host allow all
    request_header_access If-Modified-Since allow all
    request_header_access Last-Modified allow all
    request_header_access Location allow all
    request_header_access Pragma allow all
    request_header_access Accept allow all
    request_header_access Accept-Charset allow all
    request_header_access Accept-Encoding allow all
    request_header_access Accept-Language allow all
    request_header_access Content-Language allow all
    request_header_access Mime-Version allow all
    request_header_access Retry-After allow all
    request_header_access Title allow all
    request_header_access Connection allow all
    request_header_access Proxy-Connection allow all
    request_header_access User-Agent allow all
    request_header_access Cookie allow all
    request_header_access All allow all

    ඉහත 7676 ලෙස තියෙන්නේ Proxy සර්වර් එකේ Port එක. ඒකට ඔබට කැමති නො දාගන්න පුලුවන්. (8080 , 3128 වගේ උනත් දාගන්න පුලුවන් )

    දැන් Restart කරගන්න ඕනේ Squid3 ඒකට පහත Command එක Type කරලා Enter ඔබන්න.

    /etc/init.d/squid3 restart

    දැන් ඉතින් හදා ගත්ත Proxy සර්වර් ඒක බාවිතා කරන්න පුලුවන්. xxx.xxx.xxx.xxx:7676 තමයි සර්වර් එක.

    Firefox වලින් හදා ගත්ත Proxy සර්වර් එක බාවිතා කරන්නේ මෙහෙමයි.

    බේ Firefox වෙබ් බ්‍රවුසර් එකේ Firefox menu Options -> Options. යන්න

    step1.png


    ඊළගට Network tab එකට යන්න.

    step2.png


    ඊලගට Manual proxy configuration ක්ලික් කරලා http Proxy වලට ඔබේ VPS එකේ IP එක දෙන්න. Port එක දන්නවනේ එකත් අදාල තැනට ලබා දීලා Use this proxy server for all protocols කියන එකට ක්ලික් එකක් දාලා. ok ඔබන්න.

    step3.png


    ඊට පස්සේ Google.lk ගිහිල්ලා My Ip කියලා Search කරන්න. එතකොට පහතින්
    පෙන්වයි ඔබේ VPS එකේ IP එක.

    JtIJJ.png


    ගොඩක් මහන්සි වෙලා බ්ලොග් එකට ලිව්ව ලිපියක්. අනිත් අයට බලන්න bump එකක් daagena yanna.

    Source - http://lktips1.blogspot.com/2015/09/ubuntu-debian-vps-proxy-squid.html
     
    Last edited:

    charith84

    Well-known member
  • Jun 22, 2006
    10,398
    7,412
    113
    ගො0 වැඩ කරන්නහ් එපා උබ ප්‍රොක්සි පබ්ලික් පොර්ට් ඔපන් කරාම ප්‍රොවයිඩර් සස්පෙන්ඩ් කරන්නහ් පුලුවන් එකත් ට්‍රාන්ස්පෙරෙන්ට් එකක්. අඩුම තරමෙහ් ලෙවල් වන් හරි සොකට් එකක් හරි කමක් නැහ්....
    ඔකට පාස්වර්ඩ් එකක් වත් දාගනින් සස්පෙන්ඩ් වෙන්නහ් කලින්
    රැන්ඩම් පොර්ට් ස්කැන් එකකටහ් සෙට් උනොත් උබේ සර්වර් එකහ් බ්ලැක්ලිස්ට් වෙනවාහ් පබ්ලික් ප්‍රොක්සියක් හැටියටහ්
    පුටි ඉන්බිල්ට් නෙටිව් සොකට්5 ප්‍රොක්සියක් තියෙද්දි ස්කුඉඩ් දාගන්නෙහ් මොකටද බ0
     
    • Like
    Reactions: siri_ayya

    Nadun26

    Well-known member
  • Apr 27, 2015
    14,141
    12,678
    113
    38

    Nadun26

    Well-known member
  • Apr 27, 2015
    14,141
    12,678
    113
    38
    ගො0 වැඩ කරන්නහ් එපා උබ ප්‍රොක්සි පබ්ලික් පොර්ට් ඔපන් කරාම ප්‍රොවයිඩර් සස්පෙන්ඩ් කරන්නහ් පුලුවන් එකත් ට්‍රාන්ස්පෙරෙන්ට් එකක්. අඩුම තරමෙහ් ලෙවල් වන් හරි සොකට් එකක් හරි කමක් නැහ්....
    ඔකට පාස්වර්ඩ් එකක් වත් දාගනින් සස්පෙන්ඩ් වෙන්නහ් කලින්
    රැන්ඩම් පොර්ට් ස්කැන් එකකටහ් සෙට් උනොත් උබේ සර්වර් එකහ් බ්ලැක්ලිස්ට් වෙනවාහ් පබ්ලික් ප්‍රොක්සියක් හැටියටහ්
    පුටි ඉන්බිල්ට් නෙටිව් සොකට්5 ප්‍රොක්සියක් තියෙද්දි ස්කුඉඩ් දාගන්නෙහ් මොකටද බ0

    ආසාවට හදලා බලලා ලිව්වේ බන්. දැන් හදපු එක අයින් කරලා දැම්මා තැන්ක්ස් අදහසට