Blockng certain protocols only out

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)#
LVL 1
dt3itsteamAsked:
Who is Participating?
 
PugglewuggleCommented:
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
 
yuriskCommented:
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
 
PugglewuggleCommented:
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
How do you know if your security is working?

Protecting your business doesn’t have to mean sifting through endless alerts and notifications. With WatchGuard Total Security Suite, you can feel confident that your business is secure, meaning you can get back to the things that have been sitting on your to-do list.

 
dt3itsteamAuthor Commented:
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
 
PugglewuggleCommented:
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
 
dt3itsteamAuthor Commented:
Thanks!!
0
 
PugglewuggleCommented:
No prob!
0
 
dt3itsteamAuthor Commented:
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
 
PugglewuggleCommented:
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
 
dt3itsteamAuthor Commented:
Great thanks, just wishing to ask and learn as I go...  Will try tonight and award points once tested
0
 
PugglewuggleCommented:
kk!
0
 
dt3itsteamAuthor Commented:
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
 
PugglewuggleCommented:
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
 
dt3itsteamAuthor Commented:
Thanks now on my second week on my Cisco PIX 501, so I also think I'm making good progress!
0
 
PugglewuggleCommented:
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
 
dt3itsteamAuthor Commented:
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
 
PugglewuggleCommented:
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
 
dt3itsteamAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.