cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
10668
Views
20
Helpful
7
Replies

ASA Firewall Rule Time Based

robertgile1
Level 1
Level 1

I am looking to block internet access for some of our hosts during specific time periods. I would like to block it by IP since I can make sure they always get the same IP with DHCP reservations.

I tried to put the rule in but it wiped out the default rules so I reverted it real fast.

Thanks for any help or guidance on this.

7 Replies 7

Suppose youwant to block WEB access for IP x.x.x.x from 9am to 6pm on weekdays.

- first create a time-range

myPix(config)#time-range biz_time

myPIX(config-time-range)#periodic weekdays 09:00 to 18:00

- then use the time-range in the access-list

- Suppose your existing access-list on the inside interface is 101, then

access-list 101 line 1 deny tcp host x.x.x.x any eq 80 time-range biz_time

access-list 101 line 2 deny tcp host x.x.x.x any eq 443 time-range biz_time

Hope this helps.

I'll give this a try this weekend. Now I would apply this on my inside interface, right?

Farrukh Haroon
VIP Alumni
VIP Alumni

What do you mean by this?

"I tried to put the rule in but it wiped out the default rules so I reverted it real fast."

Regards

Farrukh

I was using the ASDM and as soon as I put a rule on the inside interface, it wiped out the default rules to allow outbound traffic.

That is OK, by default all 'higher' to 'lower' security communication is enabled. But once you apply your own ACL that rule goes away (as now your applied ACL has implicit deny ip any any at the end).

Regards

Farrukh

So I will have to explicitly permit other traffic out right?

something like this: [just free hand and in no way meant to be actual commands]

access-list 100

deny 192.168.0.10 based on this_time_rule

permit any to any less secure network

Yes robert, once you 'Deny' the undesired flows, you have to permit the rest.

Perhaps a better approach would be:

deny 192.168.0.10 based on this_time_rule

permit ip any

Regards

Farrukh

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: