Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Block Internet Access by IP address

Posted on 2009-02-13
16
Medium Priority
?
1,330 Views
Last Modified: 2012-05-06
I have a Cisco PIX 501 on a network of about 20 workstations.  I would like to find a command to input on the pix to block certain workstations by their static ip address from getting to the internet.
0
Comment
Question by:Trygve Thayer
  • 10
  • 6
16 Comments
 
LVL 43

Expert Comment

by:JFrederick29
ID: 23632837
conf t

object-group network block-outbound
  network-object x.x.x.x 255.255.255.255
  network-object y.y.y.y 255.255.255.255

access-list inside_access_in deny ip object-group block-outbound any
access-list inside_access_in permit ip any any

access-group inside_access_in in interface inside

x.x.x.x and y.y.y.y are the static IP addresses of the PC you want to block.

When you want to add additional IP's, simply add them to the network object-group:

conf t
object-group network block-outbound
  network-object z.z.z.z 255.255.255.255
0
 
LVL 3

Author Comment

by:Trygve Thayer
ID: 23639164
Like this?????
I have some other access lists in there.  Did not know if it would interfere.  I have to install this thing tomorrow.
 
 

PIX Version 6.3(5)
interface ethernet0 auto shutdown
interface ethernet1 100full
nameif ethernet0 outside security0
nameif ethernet1 inside security100
enable password xxxxxxxxxxxxxxx encrypted
passwd xxxxxxxxxxxxxxx encrypted
hostname MIMPIX
domain-name MIM
clock timezone EST -5
clock summer-time EDT recurring
fixup protocol dns maximum-length 512
fixup protocol ftp 21
fixup protocol h323 h225 1720
fixup protocol h323 ras 1718-1719
fixup protocol http 80
fixup protocol rsh 514
fixup protocol rtsp 554
fixup protocol sip 5060
fixup protocol sip udp 5060
fixup protocol skinny 2000
fixup protocol smtp 25
fixup protocol sqlnet 1521
fixup protocol tftp 69
names
object-group network block-outbound
  network-object 10.0.1.2 255.255.255.255
  network-object 10.0.1.3 255.255.255.255
  network-object 10.0.1.4 255.255.255.255
  network-object 10.0.1.6 255.255.255.255
  network-object 10.0.1.8 255.255.255.255
  network-object 10.0.1.9 255.255.255.255
  network-object 10.0.1.10 255.255.255.255
  network-object 10.0.1.11 255.255.255.255
  network-object 10.0.1.12 255.255.255.255
  network-object 10.0.1.13 255.255.255.255
  network-object 10.0.1.14 255.255.255.255
  network-object 10.0.1.15 255.255.255.255
  network-object 10.0.1.16 255.255.255.255
  network-object 10.0.1.17 255.255.255.255
  network-object 10.0.1.18 255.255.255.255
  network-object 10.0.1.19 255.255.255.255
  network-object 10.0.1.20 255.255.255.255
access-list inside_outbound_nat0_acl permit ip any 172.16.1.0 255.255.255.224
access-list outside_cryptomap_dyn_20 permit ip any 172.16.1.0 255.255.255.224
access-list split_tunnel_acl permit ip 10.0.1.0 255.255.255.0 any
access-list inside_access_in deny ip object-group block-outbound any
access-list inside_access_in permit ip any any
pager lines 24
mtu outside 1500
mtu inside 1500
ip address outside xx.xx.xx.xx 255.0.0.0
ip address inside 10.0.1.1 255.255.255.0
ip audit info action alarm
ip audit attack action alarm
ip local pool External_VPN_Pool 172.16.1.1-172.16.1.25 mask 255.255.255.0
pdm location 10.0.1.0 255.255.255.0 inside
pdm location 172.16.1.0 255.255.255.0 outside
pdm history enable
arp timeout 14400
global (outside) 1 interface
nat (inside) 0 access-list inside_outbound_nat0_acl
nat (inside) 1 0.0.0.0 0.0.0.0 0 0
access-group inside_access_in in interface inside
route outside 0.0.0.0 0.0.0.0 72.149.175.117 1
route inside 10.0.0.0 255.0.0.0 10.0.1.1 1
timeout xlate 3:00:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 rpc 0:10:00 h225 1:00:00
timeout h323 0:05:00 mgcp 0:05:00 sip 0:30:00 sip_media 0:02:00
timeout sip-disconnect 0:02:00 sip-invite 0:03:00
timeout uauth 0:05:00 absolute
aaa-server TACACS+ protocol tacacs+
aaa-server TACACS+ max-failed-attempts 3
aaa-server TACACS+ deadtime 10
aaa-server RADIUS protocol radius
aaa-server RADIUS max-failed-attempts 3
aaa-server RADIUS deadtime 10
aaa-server LOCAL protocol local
aaa authentication enable console LOCAL
aaa authentication http console LOCAL
aaa authentication serial console LOCAL
aaa authentication ssh console LOCAL
aaa authentication telnet console LOCAL
aaa authorization command LOCAL
http server enable
http 10.0.1.0 255.255.255.0 inside
no snmp-server location
no snmp-server contact
snmp-server community public
no snmp-server enable traps
floodguard enable
sysopt connection permit-ipsec
sysopt connection permit-pptp
sysopt connection permit-l2tp
crypto ipsec transform-set ESP-3DES-MD5 esp-3des esp-md5-hmac
crypto dynamic-map outside_dyn_map 20 set transform-set ESP-3DES-MD5
crypto map outside_map 65535 ipsec-isakmp dynamic outside_dyn_map
crypto map outside_map client configuration address initiate
crypto map outside_map client authentication LOCAL
crypto map outside_map interface outside
isakmp nat-traversal 20
isakmp policy 20 authentication pre-share
isakmp policy 20 encryption 3des
isakmp policy 20 hash md5
isakmp policy 20 group 2
isakmp policy 20 lifetime 86400
vpngroup MIMVPN_User address-pool External_VPN_Pool
vpngroup MIMVPN_User dns-server 10.0.1.5 10.0.1.1
vpngroup MIMVPN_User default-domain MIM
vpngroup MIMVPN_User split-tunnel split_tunnel_acl
vpngroup MIMVPN_User split-dns MIM.local
vpngroup MIMVPN_User idle-time 1800
vpngroup MIMVPN_User password ********
vpngroup MIMVPN_User idle-time 1800
telnet 10.0.1.0 255.255.255.0 inside
telnet 172.16.1.0 255.255.255.0 inside
telnet timeout 5
ssh 10.0.1.0 255.255.255.0 inside
ssh 172.16.1.0 255.255.255.0 inside
ssh timeout 5
management-access inside
console timeout 0
dhcpd auto_config outside
username tthayer password xxxxxxxxxxxxxx encrypted privilege 15
username admin password xxxxxxxxxxxxxxx encrypted privilege 15
privilege show level 0 command version
privilege show level 0 command curpriv
privilege show level 3 command pdm
privilege show level 3 command blocks
privilege show level 3 command ssh
privilege configure level 3 command who
privilege show level 3 command isakmp
privilege show level 3 command ipsec
privilege show level 3 command vpdn
privilege show level 3 command local-host
privilege show level 3 command interface
privilege show level 3 command ip
privilege configure level 3 command ping
privilege show level 3 command uauth
privilege configure level 5 mode enable command configure
privilege show level 5 command running-config
privilege show level 5 command privilege
privilege show level 5 command clock
privilege show level 5 command ntp
privilege show level 5 mode configure command logging
privilege show level 5 command fragment
terminal width 80
Cryptochecksum:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
0
 
LVL 43

Expert Comment

by:JFrederick29
ID: 23640923
Yes, but I notice you have VPN off this Firewall.  If these hosts you want to block should be able to access the VPN clients, you need to permit them first to the VPN pool like this:

access-list inside_access_in permit ip object-group block-outbound 172.16.1.0 255.255.255.0
access-list inside_access_in deny ip object-group block-outbound any
access-list inside_access_in permit ip any any
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Author Comment

by:Trygve Thayer
ID: 23646007
What I am wanting is to block certain PCs from getting out to the internet.  I would like anyone who has the authority to VPN in to get to anything.   specifically  10.0.1.100, ...101...102....103...104...105...106...Need 107...108...109 ext
0
 
LVL 43

Expert Comment

by:JFrederick29
ID: 23646461
Yeah, so use this list.

access-list inside_access_in permit ip object-group block-outbound 172.16.1.0 255.255.255.0
access-list inside_access_in deny ip object-group block-outbound any
access-list inside_access_in permit ip any any
0
 
LVL 3

Author Comment

by:Trygve Thayer
ID: 23649615

Sorry,
Not sure how to get it to work.  I did the comments below but it did not appear to work when I tested.  I see your last comment but not sure how to code it.  At this point I have taken everything out and am ready to try again.
conf t

object-group network block-outbound
  network-object 10.0.1.100 255.255.255.255
  network-object 10.0.1.101 255.255.255.255
  network-object 10.0.1.102 255.255.255.255
  network-object 10.0.1.103 255.255.255.255


access-list inside_access_in deny ip object-group block-outbound any
access-list inside_access_in permit ip any any

access-group inside_access_in in interface inside
 
0
 
LVL 43

Expert Comment

by:JFrederick29
ID: 23649651
This should give the PC's access to VPN but not the Internet.

object-group network block-outbound
 network-object 10.0.1.100 255.255.255.255
 network-object 10.0.1.101 255.255.255.255
  network-object 10.0.1.102 255.255.255.255
 network-object 10.0.1.103 255.255.255.255

access-list inside_access_in permit ip object-group block-outbound 172.16.1.0 255.255.255.0
access-list inside_access_in deny ip object-group block-outbound any
access-list inside_access_in permit ip any any

access-group inside_access_in in interface inside

Once applied, 10.0.1.101 should be able to access the VPN subnet but nothing on the Internet (google.com, etc...).
0
 
LVL 3

Author Comment

by:Trygve Thayer
ID: 23649795
Just to verify.
This will give any pc external access to vpn into the internal network 10.0.1.0 and see any pc.
This will also block the specifed internal PCs on 10.0.1.0  from getting out to the internet.
0
 
LVL 43

Expert Comment

by:JFrederick29
ID: 23649807
Yes, correct.
0
 
LVL 3

Author Comment

by:Trygve Thayer
ID: 23649939
Ok I am going to do it now.
0
 
LVL 3

Author Comment

by:Trygve Thayer
ID: 23654136
I am waiting for the on-site person to give me some feedback if it worked.
0
 
LVL 3

Author Comment

by:Trygve Thayer
ID: 23691465
I just received a message that they had some night shift issues as there were some people looking at porn so I guess this configuration does not work.  I am posting again in case I have input something wrong.
 

Result of firewall command: "show config"
 
: Saved
: Written by tthayer at 09:47:13.471 EST Mon Feb 16 2009
PIX Version 6.3(5)
interface ethernet0 auto
interface ethernet1 100full
nameif ethernet0 outside security0
nameif ethernet1 inside security100
enable password *************** encrypted
passwd **************** encrypted
hostname MIMPIX
domain-name MIM
clock timezone EST -5
clock summer-time EDT recurring
fixup protocol dns maximum-length 512
fixup protocol ftp 21
fixup protocol h323 h225 1720
fixup protocol h323 ras 1718-1719
fixup protocol http 80
fixup protocol pptp 1723
fixup protocol rsh 514
fixup protocol rtsp 554
fixup protocol sip 5060
fixup protocol sip udp 5060
fixup protocol skinny 2000
fixup protocol smtp 25
fixup protocol sqlnet 1521
fixup protocol tftp 69
names
object-group network block-outbound
  network-object 10.0.1.100 255.255.255.255
  network-object 10.0.1.101 255.255.255.255
  network-object 10.0.1.102 255.255.255.255
  network-object 10.0.1.103 255.255.255.255
  network-object 10.0.1.104 255.255.255.255
  network-object 10.0.1.105 255.255.255.255
  network-object 10.0.1.106 255.255.255.255
access-list inside_outbound_nat0_acl permit ip any 172.16.1.0 255.255.255.224
access-list split_tunnel_acl permit ip 10.0.1.0 255.255.255.0 any
access-list inside_access_in permit ip object-group block-outbound 172.16.1.0 255.255.255.0
access-list inside_access_in deny ip object-group block-outbound any
access-list inside_access_in permit ip any any
pager lines 24
icmp permit any outside
icmp permit any inside
mtu outside 1500
mtu inside 1500
ip address outside pppoe
ip address inside 10.0.1.1 255.255.255.0
ip audit info action alarm
ip audit attack action alarm
ip local pool External_VPN_Pool 172.16.1.1-172.16.1.25 mask 255.255.255.0
pdm location 10.0.1.0 255.255.255.0 inside
pdm location 172.16.1.0 255.255.255.0 outside
pdm location 10.0.0.0 255.0.0.0 inside
pdm location 172.16.1.0 255.255.255.0 inside
pdm location 10.0.1.101 255.255.255.255 inside
pdm location 0.0.0.0 255.255.255.0 inside
pdm logging informational 100
pdm history enable
arp timeout 14400
global (outside) 1 interface
nat (inside) 0 access-list inside_outbound_nat0_acl
nat (inside) 1 0.0.0.0 0.0.0.0 0 0
route outside 0.0.0.0 0.0.0.0 72.157.10.7 1
timeout xlate 3:00:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 rpc 0:10:00 h225 1:00:00
timeout h323 0:05:00 mgcp 0:05:00 sip 0:30:00 sip_media 0:02:00
timeout sip-disconnect 0:02:00 sip-invite 0:03:00
timeout uauth 0:05:00 absolute
aaa-server TACACS+ protocol tacacs+
aaa-server TACACS+ max-failed-attempts 3
aaa-server TACACS+ deadtime 10
aaa-server RADIUS protocol radius
aaa-server RADIUS max-failed-attempts 3
aaa-server RADIUS deadtime 10
aaa-server LOCAL protocol local
aaa authentication enable console LOCAL
aaa authentication http console LOCAL
aaa authentication serial console LOCAL
aaa authentication ssh console LOCAL
aaa authentication telnet console LOCAL
aaa authorization command LOCAL
http server enable
http 10.0.1.0 255.255.255.0 inside
http 172.16.1.0 255.255.255.0 inside
no snmp-server location
no snmp-server contact
snmp-server community public
no snmp-server enable traps
floodguard enable
sysopt connection permit-ipsec
sysopt connection permit-pptp
sysopt connection permit-l2tp
crypto ipsec transform-set ESP-3DES-MD5 esp-3des esp-md5-hmac
crypto dynamic-map outside_dyn_map 20 set transform-set ESP-3DES-MD5
crypto map outside_map 65535 ipsec-isakmp dynamic outside_dyn_map
crypto map outside_map client configuration address initiate
crypto map outside_map client authentication LOCAL
crypto map outside_map interface outside
isakmp enable outside
isakmp nat-traversal 20
isakmp policy 20 authentication pre-share
isakmp policy 20 encryption 3des
isakmp policy 20 hash md5
isakmp policy 20 group 2
isakmp policy 20 lifetime 86400
vpngroup MIMVPN_User address-pool External_VPN_Pool
vpngroup MIMVPN_User dns-server ***.***.***.*** ***.***.***.***
vpngroup MIMVPN_User default-domain MIM
vpngroup MIMVPN_User split-tunnel split_tunnel_acl
vpngroup MIMVPN_User split-dns MIM.local
vpngroup MIMVPN_User idle-time 1800
vpngroup MIMVPN_User password ********
telnet 10.0.1.0 255.255.255.0 inside
telnet 172.16.1.0 255.255.255.0 inside
telnet timeout 5
ssh 10.0.1.0 255.255.255.0 inside
ssh 172.16.1.0 255.255.255.0 inside
ssh timeout 5
management-access inside
console timeout 0
vpdn group pppoe_group request dialout pppoe
vpdn group pppoe_group localname *********@bellsouth.net
vpdn group pppoe_group ppp authentication mschap
vpdn username mimworks@bellsouth.net password ********
dhcpd dns ***.***.***.*** ***.***.***.***
dhcpd domain MIM
username tthayer password **************** encrypted privilege 15
username admin password **************** encrypted privilege 15
username Administrator password **************** encrypted privilege 15
username chiggins password **************** encrypted privilege 15
privilege show level 0 command version
privilege show level 0 command curpriv
privilege show level 3 command pdm
privilege show level 3 command blocks
privilege show level 3 command ssh
privilege configure level 3 command who
privilege show level 3 command isakmp
privilege show level 3 command ipsec
privilege show level 3 command vpdn
privilege show level 3 command local-host
privilege show level 3 command interface
privilege show level 3 command ip
privilege configure level 3 command ping
privilege show level 3 command uauth
privilege configure level 5 mode enable command configure
privilege show level 5 command running-config
privilege show level 5 command privilege
privilege show level 5 command clock
privilege show level 5 command ntp
privilege show level 5 mode configure command logging
privilege show level 5 command fragment
terminal width 80
Cryptochecksum:****************************
0
 
LVL 43

Accepted Solution

by:
JFrederick29 earned 2000 total points
ID: 23691543
Looks like you forgot to apply the access-list:

conf t
access-group inside_access_in in interface inside
0
 
LVL 3

Author Comment

by:Trygve Thayer
ID: 23692250
Works now.  Thanks for the tip.
0
 
LVL 3

Author Closing Comment

by:Trygve Thayer
ID: 31546576
The Experts patience is commendable as it took a while to get a novice like me to get it right.
0
 
LVL 3

Author Comment

by:Trygve Thayer
ID: 23692311
JFredrick29,
You might want to take a look here.
http://www.experts-exchange.com/Networking/Windows_Networking/Q_24146493.html 
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

On Feb. 28, Amazon’s Simple Storage Service (S3) went down after an employee issued the wrong command during a debugging exercise. Among those affected were big names like Netflix, Spotify and Expedia.
In this article, the configuration steps in Zabbix to monitor devices via SNMP will be discussed with some real examples on Cisco Router/Switch, Catalyst Switch, NAS Synology device.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …
Both in life and business – not all partnerships are created equal. Spend 30 short minutes with us to learn:   • Key questions to ask when considering a partnership to accelerate your business into the cloud • Pitfalls and mistakes other partners…

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question