Procurve 5412: ACL not working correctly

Hi, all!  Device in question is an HP Procurve 5412 switch.  I'm basically trying to isolate a single server by restricting all inbound access to it except for one or two IP addresses.  The following is what I have so far; it basically restricts ALL access, including the IP addresses I want to permit.

Access Lists for Port B13

  Inbound  : 1
  Type     : Standard

ProCurve Switch 5412zl# show access-list config

ip access-list standard "1"
   10 deny 0.0.0.0 255.255.255.255 log
   20 permit 10.254.120.122 0.0.0.0 log
   30 permit 10.254.0.27 0.0.0.0 log
   exit

The access list is applied to the port in question (B13), and appears to be correct based on the ACL chapter in the manual, but it clearly isn't working.  Suggestions?

Thanks!
SteveInNV
LVL 2
Steve BottomsSr Network AdminAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Don JohnstonInstructorCommented:
ACL's are processed "top down". So the first statement is matching all traffic and denying it.

So move statement 10 to the end (statement 40) and it will work as you desire.
0
Steve BottomsSr Network AdminAuthor Commented:
Top-down implies that:
FIRST: deny all traffic
SECOND: allow 10.254.120.122
THIRD: allow 10.254.0.27

That isn't what's happening.  It also clearly isn't practicing implicit DENY ALL as I would expect it to.

I tried another configuration:

ip access-list standard "1"
   10 deny 192.168.254.1 0.0.0.255 log
   20 deny 192.168.253.1 0.0.0.255 log
   30 permit 10.254.0.1 0.0.0.255 log
   40 permit 10.254.120.1 0.0.0.255 log
   exit

Logic tells me that the above would:
FIRST deny all traffic from subnet 192.168.254.x
SECOND deny all traffic from subnet 192.168.253.x
THIRD permit all traffic from subnet 10.254.0.x
FOURTH permit all traffic from subnet 10.254.120.x

No traffic at all is permitted above.  So you're suggesting I rework them as "bottom-up", since top-down clearly isn't how it's being processed?

I'll give that a try.  I also tried explicit DENY with a subnet PERMIT and it didn't work.

Thx.
SteveInNV
0
Don JohnstonInstructorCommented:
That isn't what's happening.  It also clearly isn't practicing implicit DENY ALL as I would expect it to.

From your initial post:

The following is what I have so far; it basically restricts ALL access, including the IP addresses I want to permit.

You originally said that the ACL "restricts ALL access".  And now you're saying that "isn't what's happening."

So what is happening?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Don JohnstonInstructorCommented:
Please post the relevant portions of the config from the switch.  It may be a typo that's hard to see.
0
Steve BottomsSr Network AdminAuthor Commented:
I was noting that "top-down" as you suggested isn't what was happening.  My config in the top post (looking at top post ONLY) was not working; your suggestion of "top-down" as applied to that config was not working (please refer to my initial post).

Since then I've tried several configurations, including those noted in my first reply ("I tried another configuration").  The ALSO did not work: no traffic was permitted from the PERMIT subnets.

As you suggested, I moved the explicit deny to the bottom ("bottom-up") and it didn't work either: all traffic was denied.  I tried that configuration on both the port and the VLAN individually, and no traffic from any subnet was permitted.  Clearly there's something else at work here.

This is the only ACL on this switch, and there are multiple subnets & VLANs configured on it.

Thanks for any suggestions.
SteveInNV
0
Steve BottomsSr Network AdminAuthor Commented:
Don, thanks for replying.  The below are two of the most recent attempts; neither work.

First (bottom-up, did not work: no subnets have access):
-----------------------------
ip access-list standard "1"
   10 permit 10.254.0.1 0.0.0.255 log
   20 permit 10.254.120.1 0.0.0.255 log
   30 deny 0.0.0.0 255.255.255.255 log
   exit

Second (top-down, did not work: no subnets have access):
-----------------------------
ip access-list standard "1"
   10 deny 0.0.0.0 255.255.255.255 log
   20 permit 10.254.0.1 0.0.0.255 log
   30 permit 10.254.120.1 0.0.0.255 log
   exit

The server in question is on 10.135.1.x; the switch port (B13) is configured for VLAN 135.  My workstation IPs are 10.254.0.x and 10.254.120.x and port is config'd for all VLANs (including the VLAN for this test server, 135).
0
JustInCaseCommented:
The ALSO did not work: no traffic was permitted from the PERMIT subnets.
That's exactly what Don is telling you.
When match is found (deny all - first statement) - it is game over.
You need to set more specific tasks first.
permit host
deny host
permit network
deny network
permit all
deny all

If deny all if the first statement in ACL it is the only match that will be found, it  does not matter what comes after that statement since it the rest of statements will never be processed.

This probably should be
-----------------------------
ip access-list standard "1"
   10 permit 10.254.0.0 0.0.0.255 log
   20 permit 10.254.120.0 0.0.0.255 log
   30 deny 0.0.0.0 255.255.255.255 log
   exit

Did you place ACL on good place and in right direction.
0
Steve BottomsSr Network AdminAuthor Commented:
Predrag, thanks for replying!

This this should have worked based on that, correct?

ip access-list standard "1"
   10 permit 10.254.0.1 0.0.0.255 log
   20 permit 10.254.120.1 0.0.0.255 log
   30 deny 0.0.0.0 255.255.255.255 log
   exit

The above did not work: all subnet traffic was denied access.  I'll go back to just denying access to specific subnets and see if that works; I'm clearly not having any luck with exceptions to a DENY ALL policy.

Thanks.
SteveInNV
0
JustInCaseCommented:
Did you place ACL on good place and in right direction.
Could you paste your config (remove sensitive parts), and maybe your topology?
0
Steve BottomsSr Network AdminAuthor Commented:
Predrag, thanks for replying!

As for the last octet in the IP address mask, I've tried both "0" (which is natural to me) and "1", which the HP documentation says to use.

I also just tried this configuration applied to the port the test server is connected to to keep it simple:

ip access-list standard "1"
   10 permit 10.254.0.1 0.0.0.255 log
   20 permit 10.254.120.1 0.0.0.255 log
   30 deny 192.168.254.1 0.0.0.255 log
   exit

The above did not work; my workstation on the PERMIT subnets above was unable to contact the server on subnet 10.135.1.x.  The clause in question applied to the port was "ip access-group 1 in" to block inbound traffic on the port.

Thanks.
SteveInNV
0
Steve BottomsSr Network AdminAuthor Commented:
I just found a post on a different site which says that these masks as required by HP must be entered as bi-directional (as in source IP (and mask) THEN destination IP (and mask).  The HP documentation only states a single IP address (and mask).

Can someone confirm or deny this?  Does this rule apply to EXTENDED ACLs and not standard ACLs, or both?

Thanks!
SteveInNV
0
JustInCaseCommented:
This this should have worked based on that, correct?

ip access-list standard "1"
   10 permit 10.254.0.1 0.0.0.255 log
   20 permit 10.254.120.1 0.0.0.255 log
   30 deny 0.0.0.0 255.255.255.255 log
   exit
Not if it  applied in wrong direction!!!!
If it is applied in wrong direction it will block all traffic.

And again this is inconsistent
10 permit 10.254.0.1 0.0.0.255 log

And - no need for EXTENDED ACLs in your case.
0
Don JohnstonInstructorCommented:
Once again, please post the relevant portions of the config from the switch.  Not just the ACL, but the commands that are applying it to a port or interface.  Without that, all we can do is guess.
0
JustInCaseCommented:
Don - simple logic - if  all traffic is always blocked no matter of ACL statements order...
ACL is applied in wrong direction, since from that direction can't have any match except deny all statement and as a result all traffic is dropped.
:)
But, on the other side - I agree that Author should post relevant portions of config, otherwise this is just theoretical cause. Plausible, but it is still theoretical.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Don JohnstonInstructorCommented:
Don - simple logic - if  all traffic is always blocked...
I think you're confused. I am not the author of this question.  The only query I have outstanding on this question is for the relevant portion of the configs.
0
Steve BottomsSr Network AdminAuthor Commented:
Pedrag: see the screencap below of a page in the HP Procurve ADv Traffic Mgmt Guide for 5400 series.  It's the quickest example of the (admittedly) odd way the Procurve manual shows how subnet masking in the ACLs works.  procurve.png
Don: below are the relevant portions of the current config you requested...  Please note that for the below config I changed the ".1" IP address final octet to ".0" to demonstrate to Pedrag that, according to HP documentation, it has no effect on what I'm trying to accomplish.

ip access-list standard "1"
   10 permit 10.254.120.0 0.0.0.255 log
   20 permit 10.254.0.0 0.0.0.255 log
   30 deny 192.168.253.0 0.0.0.255 log
   40 deny 192.168.254.0 0.0.0.255 log
   exit

interface A5
   name "SGB_Office_D70"

interface B13
   name "AMKM_Server"
   ip access-group "1" in
exit

vlan 135
   name "AMKM_Isolate"
   untagged A5,B13
   ip address 10.135.1.1 255.255.255.0
   exit

The above configuration yielded the same results: unable to access the server (port B13, subnet 10.135.1.x) from workstation (port A5, subnets 10.254.0.x & 10.251.120.x): no ping, no rdp, etc.

Thanks for looking, guys.  I guess the next step is to try using an extended ACL to get the task accomplished.
SteveInNV
0
Don JohnstonInstructorCommented:
Not sure I follow if there is an issue with the command structure. I've done many ACL's on 5400 series switches. Whatever digits you use in the address are irrelevant when you use a "255" in the wildcard mask.

Or put another way, 192.168.1.0 0.0.0.255 will match the exact same traffic as 192.168.1.1 0.0.0.255.

In short, it doesn't matter what you put in the last octet if the wildcard mask for that octet is "255".
0
Don JohnstonInstructorCommented:
The above configuration yielded the same results: unable to access the server (port B13, subnet 10.135.1.x) from workstation (port A5, subnets 10.254.0.x & 10.251.120.x): no ping, no rdp, etc.
This is a little confusing (for me).

Are you saying that there are servers that have IP addresses of 10.135.1.x that are connected to port B13?

And there are workstations with IP addresses of 10.254.0.x & 10.135.120.x which are connected to port A5?

If I'm not correct, here what I would like to know:

1.

What port are the servers connected to and what are their IP addresses.

2.

What port are the workstations connected to and what are their IP addresses.
0
Steve BottomsSr Network AdminAuthor Commented:
Don, thanks for replying.  I didn't have an issue with the .1 vs .0... :)  I was just demonstrating to Predrag that it didn't much matter according to HP docs.

The server in question is IP addy 10.135.1.5 (gateway 10.135.1.1) on port B13 (VLAN 135) of the switch.  My workstation is 10.254.0.27 and 10.254.120.122 on port A5 (all network VLANs including 135) of the switch.  These are the only two machines that are relevant to the issue and the only two ports on VLAN 135.  Without any ACL in place access to the server is possible from anywhere on the network (any VLAN); implementing the above ACL yields NO access to the server from any computer on any VLAN on any subnet.

I have a feeling the issue is something simple, but I'm approaching the point where it all becomes moot: I'll have to dedicate a workstation for this server for the user off-network instead of setting it up the way it should be done.

Thanks.
Steve
0
Don JohnstonInstructorCommented:
Well, I think that I see a problem.

What is between the hosts and the 5412 port A5?  I'm guessing there's a router or a multilayer switch?

If so, then you probably want the ACL applied to port A5 as inbound.
0
Steve BottomsSr Network AdminAuthor Commented:
Don, thanks for replying.  The server is wired into port B13 on the 5412 (B13 is untagged on VLAN 135) and there's a Cisco workgroup switch between my workstation and port A5 on the 5412 (A5 is tagged on VLAN 135, but I've also tried it as untagged; no effect).

I'm trying to isolate the server (port B13) from all other traffic, not my workstation (port A5).  Setting up the ACL on port A5 OUT would kinda make sense, but, once again, I'm trying to isolate the server.  I'll physically take my workstation to another office that is directly wired into the 5412 as well to test; however, I don't see the Cisco switch as a cause of the problem.

Thanks for your suggestion!
Steve
0
Don JohnstonInstructorCommented:
No. That's not I'm trying to say.

VLAN is synonymous with IP network. Which means, that if two devices are on the same VLAN, they would need to have IP addresses on the same IP network.

So you have host sending traffic in on A5 from an IP address of 10.254.0.27 going to 10.135.1.5 out B13. They are on two different networks but they are on the same VLAN.  Unless there's a device routing between the 10.254.0.0 network and the 10.135.1.0 network, it's not going to work... period. The ACL isn't the problem.
0
Steve BottomsSr Network AdminAuthor Commented:
Don, that's exactly what the 5412 does: IP routing is enabled and it happily routes traffic between a large number of VLANs (IP subnets) here all day long.  The 5412 is a L3 switch.  Sitting on VLAN 100 I access servers on VLAN 200 and print to printers on VLAN 300 (for example, all different subnets).  With the 5412 it's a non-issue.  

Thanks.
Steve
0
Don JohnstonInstructorCommented:
Sitting on VLAN 100 I access servers on VLAN 200 and print to printers on VLAN 300 (for example, all different subnets).

But that is not what is happening here.

You have a host on VLAN 135 trying to communicate with another host on VLAN 135.  But they are on different IP networks.  

Now if port A5 were in a different VLAN, then this may work.  

But as long as the hosts are in the same VLAN but not on the same network there is no way they will be able to communicate with the server unless there is an external router between them and port A5.
0
Don JohnstonInstructorCommented:
Here's an example of how this could work.

With this config, host 10.254.0.27 will be able to communicate with the server at 10.135.1.5

interface A5
   name "SGB_Office_D70"

interface B13
   name "AMKM_Server"
exit

vlan 135
   name "AMKM_Isolate"
   untagged B13
   ip address 10.135.1.1 255.255.255.0
   exit

vlan 254
   name "Hosts"
   untagged A5
   ip address 10.254.0.1 255.255.255.0
   exit

Open in new window

0
Steve BottomsSr Network AdminAuthor Commented:
Don, thanks for reply.

That *is* how the switch is configured.  For brevity's sake I did not include all of the VLAN configurations because they really aren't relevant to the question.  Just as a test I removed the Cisco switch from the equation and patched the workstation directly into an untagged port on the 10.254.0.x subnet and it still didn't work (with the ACL in place).  The above is how we have been working for years.  Without an ACL in place every machine on the network (all subnets/VLANs) can communicate perfectly with the test server--- yes, machines sitting on 10.254.x.y and 192.168.254.x and 10.0.1.x and 172.17.254.x can communicate perfectly with the test server on 10.135.1.x: no routers or switches other than the core 5412.  Routing is *not* an issue here.  If it were no machine would EVER be able to communicate with the server.

I'll try another board for suggestions, but thank you very much for some important feedback!
SteveInNV
0
Steve BottomsSr Network AdminAuthor Commented:
For anyone still following this thread, I found the resolution. It turns out that, according to HP, ACLs applied to VLANs are relative to the router and not to the port/device you're applying the ACL to.  Rather than thinking in terms of traffic inbound to the machine/VLAN in question, it is (in my case) based on traffic outbound of the router (which, technically, all internal traffic *is* outbound from the router).

This was never a traffic routing issue (ala traffic flow across routed vs non-routed network segments).  Thanks for Predrag for planting that bug in my head about the traffic flow direction.  :)
1
dts3909Commented:
This comment and attached manual helps make some of the previous comments by others more current as of 4/2016.

HPE does not discuss ACLs to any great degree in the current Advancement Traffic Management Guide.  HPE now uses the Access-Security-Guide manual to better describe ACLs.

This wildcard calculator is great and easy to use:  http://www.subnet-calculator.com/wildcard.php
HPE-access-control-emr_na-c04777632-.pdf
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Switches / Hubs

From novice to tech pro — start learning today.

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.