Time-based on Cisco Router

My friend ask me to configure router in his office. He wanted to only allow web surfing during a particular time of day or allow access to a particular server only during work hours. Basically he want to restrict traffic based on the time of day.

The scenario like this;

“During work hours users must be able to access web sites only through a proxy server located at 100.180.43.1 (The proxy server is listening on tcp port 3128). After work hours users should be granted full access to any IP address and any website. During work hours the only thing they should be able to access is the proxy server.”

Configuration;

time-range NON-WORK-HOURS
 periodic weekend 0:00 to 23:59
 periodic weekdays 0:00 to 8:59
 periodic weekdays 17:01 to 23:59
!
ip access-list extend DENY_WEB
 permit ip any any time-range NON-WORK-HOURS
 permit tcp any host 100.180.43.1 eq 3128

Now, i’ve an access list that matches IP traffic only for the time-range NON-WORK-HOURS. During work hours we can only access the proxy server at 100.180.43.1 on tcp port 3128 and everything else will be blocked.

So far, my friend not call me back.. so i think it work.. hehehhehe.

source code


About this entry