Top Ad unit 728 × 90

Latest updates

recent

PROXY SERVER


#### TO CONFIGURE PROXY SERVER ####

Requirement: 2 LAN Card System
1st Lan Card:Public IP (to get internet access)
2nd Lan Card:Private Ip (to share internet access)

'Step 1:-As Per the Lab to Get the Internet Access'
# vi /etc/resolv.conf (open this file & provide dns ip as per lab)
nameserver 192.168.0.250
:wq(save & quit the file)
# firefox (open the browser & try to access bmw,yahoo,gmail)

'Step 2:-Check the Ip & Assign Hostname'
# ifconfig (to check)
# hostname proxy.zoom.com
# vi /etc/hosts (provide the entry in hostfile)
# vi /etc/hostname (make host permanent)

'Step 3:-Install the Package'
# yum install squid* -y

'Step 4:-Edit the M.C.F'
# vim /etc/squid/squid.conf
Go to line no.62 & remove # sign to enable cache location
And Write the Rules Any were in the file or from line.47 as given
below:-
acl zoom src 192.168.0.0/24
http_access allow zoom
:wq(save & quit the file)

'Step 5:-Restart the Service'
# service squid restart
# systemctl enable squid.service (to enable permanent)
# service squid status (to check the status)

'Step 6:-To Check the Result from LINUX Client'
GO TO LINUX SYSTEM--->Open--->Firefox Browser
Go to--->Edit--->Preferences--->Advance--->Network--->Settings
Select--->Manual Proxy
IP:192.168.0.108 (define private ip of proxy server)
Port No: 3128
---->Close

Try to Access the Webpages:bmw,yahoo,gmail (as per the lab setup)

'Step 7:-To Check the Result from WINDOWS Client'
GO TO WINDOWS SYSTEM--->Open--->Internet Explorer
Go to--->Tools--->Internet Options--->Connections--->LAN Settings
--->Use Proxy Server--->IP:192.168.0.108 Port No:3128--->OK--->OK
Try to Access the Webpages:bmw,yahoo,gmail (as per the lab setup)

'Step 8:-To Block a Single Website for Complete Network'
# vim /etc/squid/squid.conf (open the file & add rule as given below)
acl zoom src 192.168.0.0/24
acl zoom1 url_regex www.bmw.com
http_access deny zoom1
http_access allow zoom
:wq(save & quit the file)
# service squid restart
Check the Result From Any Client System by access www.bmw.com

'Step 9:-To Block a Multiple Websites for Complete Network'
# vi /web (create one file & add websites - to block)
www.bmw.com
www.gmail.com
:wq(save & quit the file)
# vim /etc/squid/squid.conf
acl zoom2 url_regex "/web"
http_access deny zoom2
:wq(save & quit the file)
# service squid restart
Check the Result From Any Client System by access bmw,yahoo websites

'Step 10:-To Block Internet Access for One System'
# vim /etc/squid/squid.conf
acl zoom3 src 192.168.0.52 <---Client PC IP
http_access deny zoom3
:wq(save & quit the file)
# service squid restart
Check the Result from 192.168.0.52 System by access internet services

'Step 11:-To Block Internet Access for Multiple Systems'
# vi /ip (create one file & add ip's)
192.168.0.52
192.168.0.55
:wq(Save & quit the file)
# vim /etc/squid/squid.conf
acl zoom4 src "/ip"
http_access deny zoom4
:wq(save & quit the file)
# service squid restart
Check the Result from multiple systems by accessing internet services

'Step 12:-To Block the Access based on Mac Address'
# arp <client_pc_ip> (to get the mac address of client pc)
Copy the Mac Address
# vim /etc/squid/squid.conf
acl zoom5 arp PASTE_MAC_ADDRESS_HERE
http_access deny zoom5
:wq(save & quit the file)
# service squid restart
Check the Result by Go to the MAC Address System & try to access
internet

'Step 13:-To Allow the Internet Access Based on Time'
# vim /etc/squid/squid.conf
acl zoom src 192.168.0.0/24
acl zoom6 time 10:00-18:00
http_access allow zoom zoom6
http_access deny zoom
:wq(save & quit)
# service squid restart (restart & check the result)

'Step 14:-To Give the Access Only for one Website for Complete Network'
Write only 2 rules as given below:-
# vim /etc/squid/squid.conf
acl zoom src 192.168.0.0/24
acl zoom1 url_regex www.gmail.com
http_access allow zoom zoom1
http_access deny zoom
:wq(save & quit the file)
# service squid restart (restart and check the result)
CHECK THE RESULT FROM ANY CLIENT PC

'Step 15:-To Check the Server Log Files'
# cd /var/log/squid (access in proxy server pc)
# cat access.log
PROXY SERVER Reviewed by Unknown on 4:03 PM Rating: 5
© 2007 - 2016. All Rights Reserved by Babashaheer Blog

Contact Form

Name

Email *

Message *

Powered by Blogger.