Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Blockng certain protocols only out

Posted on 2008-10-13
18
Medium Priority
?
348 Views
Last Modified: 2012-05-05
Hi

Following on from the question below:-

http://www.experts-exchange.com/Hardware/Networking_Hardware/Firewalls/Q_23799210.html

My query is now the reverse, in that how can I specify only www and ftp for example for all as allowed traffic outbound?

Below is my running config:-

PIX Version 6.3(5)
interface ethernet0 auto
interface ethernet1 100full
nameif ethernet0 outside security0
nameif ethernet1 inside security100
enable password SX/Y7cXtfgcNOcz9 encrypted
passwd 2KFQnbNIdI.2KYOU encrypted
hostname pixfw
domain-name workgroup
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
name 192.168.0.13 Exchange
access-list outside permit tcp any interface outside eq smtp
access-list outside permit tcp any interface outside eq https
access-list inside deny tcp any any eq ftp
access-list inside permit ip any any
pager lines 24
icmp deny any outside
mtu outside 1500
mtu inside 1500
ip address outside dhcp setroute retry 4
ip address inside 192.168.0.1 255.255.255.0
ip audit info action alarm
ip audit attack action alarm
pdm location 192.168.16.58 255.255.255.255 outside
pdm location Exchange 255.255.255.255 inside
pdm location 192.168.0.1 255.255.255.255 outside
pdm history enable
arp timeout 14400
global (outside) 1 interface
nat (inside) 1 0.0.0.0 0.0.0.0 0 0
static (inside,outside) tcp interface https Exchange https netmask 255.255.255.2
55 0 0
static (inside,outside) tcp interface smtp Exchange smtp netmask 255.255.255.255
 0 0
access-group outside in interface outside
access-group inside in interface inside
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
http server enable
http 192.168.0.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
telnet 192.168.0.0 255.255.255.0 inside
telnet timeout 15
ssh 192.168.0.1 255.255.255.255 outside
ssh timeout 15
console timeout 0
dhcpd address 192.168.0.2-192.168.0.10 inside
dhcpd dns 81.26.107.2
dhcpd lease 3600
dhcpd ping_timeout 750
dhcpd enable inside
terminal width 80
banner login Disconnect immediately if not authorised
banner motd Home cable firewall
Cryptochecksum:3962af86b5023ab0f1546176d4aa3422
: end
pixfw(config)#
0
Comment
Question by:dt3itsteam
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 8
18 Comments
 
LVL 4

Expert Comment

by:yurisk
ID: 22707144
config t
no access-list inside deny tcp any any eq ftp
access-list inside line 1 permit tcp any any eq 80
  access-list inside line 1 permit tcp any any eq ftp

no access-list inside permit ip any any
0
 
LVL 12

Expert Comment

by:Pugglewuggle
ID: 22707947
The above commands won't do the job.
These will:
access-list inside permit tcp any any eq ftp
access-list inside permit tcp any any eq www
access-list inside permit udp any any eq dns
access-list inside permit tcp any any eq dns
access-list inside deny ip any any
no access-list inside deny tcp any any eq ftp

What this will do is
  1. Allow FTP & WWW
  2. Allow DNS so you can resolve addresses
  3. deny everything else
  4. delete old ACL denying FTP
Cheers! Let me know if you have any questions!
0
 
LVL 12

Accepted Solution

by:
Pugglewuggle earned 1000 total points
ID: 22707955
Actually, change above to this (they must be executed in order):
access-list inside permit tcp any any eq ftp
access-list inside permit tcp any any eq www
access-list inside permit udp any any eq dns
access-list inside permit tcp any any eq dns
access-list inside deny ip any any
no access-list inside deny tcp any any eq ftp
no access-list inside permit ip any any
Cheers!
0
Looking for the Wi-Fi vendor that's right for you?

We know how difficult it can be to evaluate Wi-Fi vendors, so we created this helpful Wi-Fi Buyer's Guide to help you find the Wi-Fi vendor that's right for your business! Download the guide and get started on our checklist today!

 
LVL 1

Author Comment

by:dt3itsteam
ID: 22709274
Thanks will try tonight, incidentally do any of you know of a good (free) SSH client I can download, allowing me to test the configuration remotely?
0
 
LVL 12

Expert Comment

by:Pugglewuggle
ID: 22709277
Yes I do as a matter of fact!
PuTTY is considered the best SSH client out there. It's free, easy, and you can get it here:

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
Cheers!
0
 
LVL 1

Author Comment

by:dt3itsteam
ID: 22709294
Thanks!!
0
 
LVL 12

Expert Comment

by:Pugglewuggle
ID: 22709327
No prob!
0
 
LVL 1

Author Comment

by:dt3itsteam
ID: 22709371
Just a quickie, is the statement:-

access-list inside deny ip any any

An explicit deny after all ACL's have been executed?

If I was to leave "access-list inside permit ip any any" I guess ths would still permit all I.P traffic out despite of the ACL's?
0
 
LVL 12

Expert Comment

by:Pugglewuggle
ID: 22709390
You don't really need this, I just put it there to demonstrate that all were being blocked - it is indeed implicit. :)
Yes, leaving that would permit all traffic. To only allow FTP and WWW, just run the commands I sent.
Cheers!
0
 
LVL 1

Author Comment

by:dt3itsteam
ID: 22709398
Great thanks, just wishing to ask and learn as I go...  Will try tonight and award points once tested
0
 
LVL 12

Expert Comment

by:Pugglewuggle
ID: 22709467
kk!
0
 
LVL 1

Author Comment

by:dt3itsteam
ID: 22709489
I'm assuming the "access-list inside deny ip any any" won't impact my PAT ACL rules?  or are my PAT rules allowed through by the following statement:-

"access-group outside in interface outside"
0
 
LVL 12

Expert Comment

by:Pugglewuggle
ID: 22709498
The rules are allowed through that access-group command indeed. Not the "access-list inside deny ip any any" one. You have a better idea of what's going on than you think you do. :)
0
 
LVL 1

Author Comment

by:dt3itsteam
ID: 22709503
Thanks now on my second week on my Cisco PIX 501, so I also think I'm making good progress!
0
 
LVL 12

Expert Comment

by:Pugglewuggle
ID: 22709521
You are! It took me lots of time messing up my internet connection when I was getting started on the ASA (new PIX) a few years ago. :)
0
 
LVL 1

Author Comment

by:dt3itsteam
ID: 22709602
I'm very keen to only use the CLI, I know I can use PDM but this kinda circumvents using a PIX if I use a GUI.  May as well use a bog standard Linksys router.  Cisco's something I'm really keen to get my head round!
0
 
LVL 12

Expert Comment

by:Pugglewuggle
ID: 22709668
Well, you'll find that the PDM and ASDM (higher versions of PIX and ASA) are really nice for some things and CLI is better for some.
For example modifying ACLs and some NAT rules (and viewing syslogs too) is much much better than doing it with CLI. Just the same, using CLI to view dhcp bindings and manually define VLANs is easier.
In fact, there are several commands only available in CLI that the GUI doesn't support, although the ASDM does a GREAT job of doing what it does - the graphs for analyzing traffic protocols, bandwidth, sources, etc. are nice too.
I just use which tool does the job best. Sometimes it's CLI, sometimes it's ASDM.
Everybody's different on what they like to use for what, but you'll see what I mean as you progress.
Cheers!
0
 
LVL 1

Author Comment

by:dt3itsteam
ID: 22714042
Hi Pugglewuggle,

Everything worked fine, except I had to hange the following lines:-

access-list inside permit udp any any eq dns
access-list inside permit tcp any any eq dns

to:-

access-list inside permit udp any any eq 53
access-list inside permit tcp any any eq 53

which was changed to:-

access-list inside permit udp any any eq domain
access-list inside permit tcp any any eq domain

Thiis is my running config :-

PIX Version 6.3(5)
interface ethernet0 auto
interface ethernet1 100full
nameif ethernet0 outside security0
nameif ethernet1 inside security100
enable password SX/Y7cXtfgcNOcz9 encrypted
passwd 2KFQnbNIdI.2KYOU encrypted
hostname pixfw
domain-name workgroup
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
name 192.168.0.13 Exchange
access-list outside permit tcp any interface outside eq smtp
access-list outside permit tcp any interface outside eq https
access-list inside deny tcp any any eq ftp
access-list inside permit tcp any any eq ftp
access-list inside permit tcp any any eq www
access-list inside permit udp any any eq domain
access-list inside permit tcp any any eq domain
access-list inside deny ip any any
pager lines 24
icmp deny any outside
mtu outside 1500
mtu inside 1500
ip address outside dhcp setroute retry 4
ip address inside 192.168.0.1 255.255.255.0
ip audit info action alarm
ip audit attack action alarm
pdm location 192.168.16.58 255.255.255.255 outside
pdm location Exchange 255.255.255.255 inside
pdm location 192.168.0.1 255.255.255.255 outside
pdm history enable
arp timeout 14400
global (outside) 1 interface
nat (inside) 1 0.0.0.0 0.0.0.0 0 0
static (inside,outside) tcp interface https Exchange https netmask 255.255.255.255 0 0
static (inside,outside) tcp interface smtp Exchange smtp netmask 255.255.255.255 0 0
access-group outside in interface outside
access-group inside in interface inside
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
http server enable
http 192.168.0.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
telnet 192.168.0.0 255.255.255.0 inside
telnet timeout 15
ssh 192.168.0.1 255.255.255.255 outside
ssh timeout 15
console timeout 0
dhcpd address 192.168.0.2-192.168.0.10 inside
dhcpd dns 81.26.107.2
dhcpd lease 3600
dhcpd ping_timeout 750
dhcpd enable inside
terminal width 80
banner login Disconnect immediately if not authorised
banner motd Home cable firewall
Cryptochecksum:eb2f60263be6afc8c48ae99bdb852e4d
: end
pixfw(config)#
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

A 2007 NCSA Cyber Security survey revealed that a mere 4% of the population has a full understanding of firewalls. As business owner, you should be part of that 4% that has a full understanding.
This article is in regards to the Cisco QSFP-4SFP10G-CU1M cables, which are designed to uplink/downlink 40GB ports to 10GB SFP ports. I recently experienced this and found very little configuration documentation on how these are supposed to be confi…
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…
Suggested Courses

705 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