Community discussions

MikroTik App
 
aroundi
just joined
Topic Author
Posts: 10
Joined: Wed Dec 16, 2020 3:15 am

Disable Single LAN IP Address

Sat Mar 02, 2024 8:22 am

Hello,

I am looking for a simple command that will disable/enable connections to a single local IP address on my LAN.

I've tried the following that I found in this forum post - viewtopic.php?t=119019

/ip address disable [find address="10.1.10.xxx"]

/ip address set [find address="10.1.10.xxx"] disabled=yes

But neither of these do not seem to work as the target machine still responds to pings, at least in ROS v7.7.

Any help would be greatly appreciated.

Thanks
 
jaclaz
Long time Member
Long time Member
Posts: 667
Joined: Tue Oct 03, 2023 4:21 pm

Re: Disable Single LAN IP Address

Sat Mar 02, 2024 11:48 am

That command is to disable an IP address that is assigned to an interface of the router/switch, not an external one.

You cannot actually enable or disable an IP address on another device, you can however "intercept" traffic from/to that address and redirect it to nowhere (action=drop in /ip firewall filter).

This you can normally do through a firewall rule but you cannot entirely block the traffic within the same LAN/subnet, because it doesn't pass through the firewall.

If you have an interface on the router switch that is connected to only that IP that you want to block, you can disable that interface IP address (i.e. the IP on the other side) or the actual interface, but if (like in most cases) you have a bridge you need to disable the interface, as the IP is assigned to the bridge.

And the firwall approach is not that easy as the firewall filter can be applied to different chains, depending on what you want to achieve in detail, and since firewall rules are executed sequentially it is vital to have the rules in the "right" order (i.e. if the "drop" rule is after an "accept" rule including that IP it will never find anything to drop).

You should better detail your network setup and what you would like to obtain, and post your configuration, along the lines of this post:
viewtopic.php?t=203686#p1051720

this way someone will (hopefully) be able to help you.
 
User avatar
baragoon
Member
Member
Posts: 310
Joined: Thu Jan 05, 2017 10:38 am
Location: Kyiv, UA
Contact:

Re: Disable Single LAN IP Address

Sat Mar 02, 2024 11:57 am

I think it can be done with routing rules. Select src/32, dst 0.0.0.0/0 and drop
 
holvoetn
Forum Guru
Forum Guru
Posts: 5500
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: Disable Single LAN IP Address

Sat Mar 02, 2024 3:20 pm

If it doesn't pass the router, it doesn't get dropped.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12014
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Disable Single LAN IP Address

Mon Mar 04, 2024 2:05 pm

Seeing the degree of the OP question, I doubt your answers are adequate.
First of all the OP needs to understand how IPv4 works...

Who is online

Users browsing this forum: No registered users and 5 guests