Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- nano /etc/iptables.up.rules
- -A INBOUND -p tcp -m tcp --dport 8888 -j ACCEPT
- -A INBOUND -p udp -m udp --dport 8888 -j ACCEPT
- -A PREROUTING -p tcp -m tcp -i eth0 --dport 80 -j DNAT --to-destination 192.168.15.1:8888 # eth0 -> lan; 192.168.15.1-> squid server
- -A PREROUTING -p tcp -m tcp -i eth0 --dport 80 -j REDIRECT --to-ports 8888
- sudo apt-get install squid
- #sudo apt-get install squid3
- nano /etc/squid/squid.conf
- http_port 8888 transparent
- visible_hostname hureeict.edu.mn
- ## Unlimited Access Users ##
- #acl BIGBOSS src 192.168.15.19
- #http_access allow BIGBOSS
- ## Time Settings ##
- acl biz_hours time M T W T F 9:00-17:00
- ## Websites/Download/Ports/MAC block ##
- acl website_block dstdom_regex facebook.com
- http_access deny website_block biz_hours
- acl download_block urlpath_regex .mp3 .avi .mpeg .mov .torrent
- http_access deny download_block biz_hours
- acl ports_block port 6969 6881-6899
- http_access deny ports_block biz_hours
- acl mac_block arp 00:13:45:d3:24:e4
- https_access deny mac_block biz_hours
- ## Access Subnets ##
- #acl localnet src 127.0.0.1/255.255.255.255
- #http_access allow localnet
- acl lan_15 src 192.168.15.0/24 192.168.16.0/24
- http_access allow lan_15
- # http_access allow lan_15 biz_hours
- # http_access deny all
- # http_access deny !Safe_ports
- ## Delay Pools - 74kb/s ##
- delay_pools 1
- delay_class 1 2
- delay_parameters 1 74000/74000 74000/74000
- delay_access 1 allow lan_15 biz_hours
- #delay_access 1 allow lan_15
- #delay_access 1 deny lan_15 !biz_hours
- #delay_access 1 deny lan_15 all
- ## Cache 20GB ##
- cache_dir ufs /var/spool/squid 20000 16 256
- sudo /etc/init.d/squid restart
- sudo nano /etc/sysctl.conf
- net.ipv4.ip_forward=1
- net.ipv6.conf.all.forwarding=1
Advertisement
Add Comment
Please, Sign In to add comment