01-19-2025 03:20 PM
help me create an access list in the home router:
-only Pc1 to access the finance server
-webserver to be accessed by all pc
-database server to be accessed by all pc except PC1
01-19-2025 03:42 PM - edited 01-19-2025 05:15 PM
I dont know which IP address you will use, so, I used representation and you can convert in IP address
ip access-list extended HOME-ROUTER
permit ip host PC1-IP host FINANCE-SERVER-IP
deny ip any host FINANCE-SERVER-IP
deny ip host PC1-IP host DATA-BASE-SERVER-IP
permit ip any any
Apply the ACL on the interface facing switch in "IN" direction.
int X/X
ip access-group HOME-ROUTER in
01-19-2025 04:18 PM
@Flavio Miranda may have rushed his reply, just a bit.
ip access-list extended HOME-ROUTER
permit ip host PC1-IP host FINANCE-SERVER-IP
deny ip any host FINANCE-SERVER-IP
deny ip host PC1-IP host DATA-BASE-SERVER-IP
permit ip any any
Apply the ACL on the interface facing the switch 1 in "IN" direction.
Additionally, if you want to insure no two way traffic, you can block traffic from the servers outbound (as the above only blocks traffic to the servers - which, again, is likely sufficient).
Also, the above ACL would also work on the interface facing switch 0 in "OUT" direction.
Possibly the above would not be sufficient, to support "only Pc1 to access the finance server", applied as "IN" on switch 1 interface, if you also intend to block Internet hosts to Finance Server too. However, it would work for those hosts too, if applied as "OUT" on switch 0 interface.
Lastly, the above ACL could swap source and destination parameters and be used as "IN" on switch 0 interface or "OUT" on switch 1 interface.
01-19-2025 04:57 PM
01-19-2025 05:44 PM
@armelinobakiaj wrote:
Can u like solve it
Yes I can, but believe what @Flavio Miranda originally provided, beyond missing one keyword and making it clear which switch connected interface to apply the ACL on, is a solution.
Is there some reason you believe what we both provided is not a solution? Or, are you looking for something further? Or, did my additional remarks cause you confusion?
01-20-2025 02:43 PM
something further would be great
01-20-2025 03:42 PM
@armelinobakiaj wrote:
something further would be great
Unclear what "further" would be. Can you elaborate?
01-19-2025 09:56 PM - edited 01-19-2025 09:57 PM
Hello @armelinobakiaj
Assuming that:
192.168.1.10
192.168.1.11 - 192.168.1.254
10.0.0.1
10.0.0.2
10.0.0.3
ip access-list extended HOME_ACL
remark Allow PC1 to access the finance server
permit ip host 192.168.1.10 host 10.0.0.1
remark Allow all PCs to access the web server
permit ip 192.168.1.0 0.0.0.255 host 10.0.0.2
remark Deny PC1 from accessing the database server
deny ip host 192.168.1.10 host 10.0.0.3
remark Allow other PCs to access the database server
permit ip 192.168.1.0 0.0.0.255 host 10.0.0.3
remark Deny all other traffic
deny ip any any
-- It is generally a good practice to explicitly deny all traffic at the end of an ACL. While Cisco ACLs implicitly deny all traffic not explicitly permitted, adding an explicit deny statement at the end provides clarity, better logging, and debugging capabilities. Also, as concerned applying an extended ACL, the best practice is to apply it as close to the source as possible. This approach minimizes unnecessary traffic in the network because it prevents unwanted packets from traveling far before being dropped.
--Apply this extended ACL on Router's interface facing the Switch1:
interface GigabitEthernetx/x
ip access-group HOME_ACL in
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide