?
Solved

Pix rule

Posted on 2004-09-02
3
Medium Priority
?
777 Views
Last Modified: 2013-11-16
How can I only allow SSH acess to a specific netblock of external IPs? Say, 192 is an external in this case ...

This is the basic config at the moment allowing all access ...
access-list 101 permit tcp any host 10.0.0.10 eq ssh

access-list 101 permit tcp 192.168.1.0 255.255.255.220 10.0.0.10 eq ssh??? would that allow 192.168.1.0 - 192.168.1.35

0
Comment
Question by:af500
[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
3 Comments
 
LVL 11

Expert Comment

by:PennGwyn
ID: 11968321
Almost.  Access lists don't use a *subnet* mask, they use a *wildcard* mask, sometimes thought of as a complemented subnet mask.  The mask specifies the bits that are allowed to vary.

So "192.168.1.0 0.0.0.31" specifies 192.168.1.0-192.168.1.31, and "192.168.1.32 0.0.0.3" specifies 192.168.1.32-192.168.1.35.  So two rules will get you the range you've specified.

I'm fairly certain, though, that access lists also list the *source* first, and then the destination.  So the final rules look like:

access-list 101 permit tcp host 10.0.0.10 192.168.1.0 0.0.0.31 eq ssh
access-list 101 permit tcp host 10.0.0.10 192.168.1.32 0.0.0.3 eq ssh

0
 
LVL 79

Accepted Solution

by:
lrmoore earned 200 total points
ID: 11968682
Actually, the PIX does use a netmask and not a wildcard mask, so it's a little more difficult..
Sorry, PennGwyn...

access-list permit tcp host 10.0.0.10 192.168.1.0 255.255.255.224  eq ssh     (.1 - .30)
access-list permit tcp host 10.0.0.10 host 192.168.1.31 eq ssh
access-list permit tcp host 10.0.0.10 host 192.168.1.32 eq ssh
access-list permit tcp host 10.0.0.10 host 192.168.1.33 eq ssh
access-list permit tcp host 10.0.0.10 host 192.168.1.34 eq ssh
access-list permit tcp host 10.0.0.10 host 192.168.1.35 eq ssh

Or, you could create a host group, and assign the group to the acl:

object-group network SSH
        network-object 192.168.1.0 255.255.255.0
        network-object 192.168.1.31 255.255.255.255
        network-object 192.168.1.32 255.255.255.255
        network-object 192.168.1.33 255.255.255.255
        network-object 192.168.1.34 255.255.255.255
        network-object 192.168.1.35 255.255.255.255

access-list permit tcp host 10.0.0.10 object-group SSH eq ssh

This gives you the flexibility to selectively add/remove one or more IP addresses instead of using a whole range..




0
 
LVL 11

Expert Comment

by:billwharton
ID: 11980439
af500

If you are looking to allow SSH to remotely administer the PIX firewall, you can use:

ssh <network> <subnet mask> <interface>

Examples:
1) If you want inside network 192.168.1.0 to be able to SSH into the PIX, use
ssh 192.168.1.0 255.255.255.0 inside

2) If you want only IP address 192.168.1.22 to be able to SSH into the pix, use
ssh 192.168.1.22 255.255.255.255 inside
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

I recently attended Cisco Live! in Las Vegas, a conference that boasted over 28,000 techies in attendance, and a week of hands-on learning hosted by a solid partner with which Concerto goes to market.  Every year, Cisco displays cutting-edge technol…
Use of TCL script on Cisco devices:  - create file and merge it with running configuration to apply configuration changes
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…
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
Course of the Month10 days, 23 hours left to enroll

770 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