Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

ASA Firewall Rule Time Based

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.

  • Firewalling
7 REPLIES

Re: ASA Firewall Rule Time Based

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.

New Member

Re: ASA Firewall Rule Time Based

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

Re: ASA Firewall Rule Time Based

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

New Member

Re: ASA Firewall Rule Time Based

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.

Re: ASA Firewall Rule Time Based

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

New Member

Re: ASA Firewall Rule Time Based

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

Re: ASA Firewall Rule Time Based

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

1818
Views
15
Helpful
7
Replies
This widget could not be displayed.