Community discussions

MikroTik App
 
korg
Member Candidate
Member Candidate
Topic Author
Posts: 141
Joined: Tue Apr 26, 2016 4:10 pm

Not allowing one certain IP address to see the rest of the network

Fri Oct 05, 2018 1:06 pm

Hi,

i have a question about allowing resp disallowing one certain IP address from the subnet to access nothing else but internet.

So, i have a office subnet 192.168.0.x... i allowed one laptop to access this network .. but.. now it can see all network.

How can i setup FW so that this IP has ONLY connection to the internet and not to the rest of the local network?

/ip firewall filter
add action=drop chain=forward comment="drop connection from IP address to the Local Network" dst-address=192.168.0.22 src-address=192.168.0.0/24

tx

korg
 
User avatar
Anumrak
Forum Guru
Forum Guru
Posts: 1174
Joined: Fri Jul 28, 2017 2:53 pm

Re: Not allowing one certain IP address to see the rest of the network

Fri Oct 05, 2018 1:16 pm

Hey. Just set src-address as your laptop and set dst-address as a prohibited network.

or you can set firewall rule like this:

/ip firewall filter
add action=accept chain=forward dst-address=!192.168.0.0/24 src-address=192.168.0.22

P.S.: don't forget to lift this rule up above common forward rule.
 
korg
Member Candidate
Member Candidate
Topic Author
Posts: 141
Joined: Tue Apr 26, 2016 4:10 pm

Re: Not allowing one certain IP address to see the rest of the network

Fri Oct 05, 2018 1:42 pm

Tx a lot... I'll use your tipp

korg
 
korg
Member Candidate
Member Candidate
Topic Author
Posts: 141
Joined: Tue Apr 26, 2016 4:10 pm

Re: Not allowing one certain IP address to see the rest of the network

Fri Oct 05, 2018 1:46 pm

And... how can i Limit only this one particular MAC address to connect to the WLAN network?

korg
 
User avatar
Anumrak
Forum Guru
Forum Guru
Posts: 1174
Joined: Fri Jul 28, 2017 2:53 pm

Re: Not allowing one certain IP address to see the rest of the network

Fri Oct 05, 2018 2:21 pm

And... how can i Limit only this one particular MAC address to connect to the WLAN network?

korg
For WLAN you have wireless access list which allowes to connect only macs you want.
Last edited by Anumrak on Fri Oct 05, 2018 3:34 pm, edited 1 time in total.
 
korg
Member Candidate
Member Candidate
Topic Author
Posts: 141
Joined: Tue Apr 26, 2016 4:10 pm

Re: Not allowing one certain IP address to see the rest of the network

Fri Oct 05, 2018 3:24 pm

OK....

sure... you're right...

tx

Korg
 
mixig
Member
Member
Posts: 315
Joined: Thu Oct 27, 2011 2:19 pm

Re: Not allowing one certain IP address to see the rest of the network

Mon Oct 08, 2018 12:05 pm

Hey. Just set src-address as your laptop and set dst-address as a prohibited network.

or you can set firewall rule like this:

/ip firewall filter
add action=accept chain=forward dst-address=!192.168.0.0/24 src-address=192.168.0.22

P.S.: don't forget to lift this rule up above common forward rule.
Be aware if IP address is in the same subnet as your network LAN traffic will NOT pass through the router (same L2 domain), of course if you are using some switch behind your router
 
User avatar
Anumrak
Forum Guru
Forum Guru
Posts: 1174
Joined: Fri Jul 28, 2017 2:53 pm

Re: Not allowing one certain IP address to see the rest of the network

Mon Oct 08, 2018 2:10 pm

Hey. Just set src-address as your laptop and set dst-address as a prohibited network.

or you can set firewall rule like this:

/ip firewall filter
add action=accept chain=forward dst-address=!192.168.0.0/24 src-address=192.168.0.22

P.S.: don't forget to lift this rule up above common forward rule.
Be aware if IP address is in the same subnet as your network LAN traffic will NOT pass through the router (same L2 domain), of course if you are using some switch behind your router
It will. Beacause destination address won't be router's IP. It will be router's mac, but not IP.
 
User avatar
cdiedrich
Forum Veteran
Forum Veteran
Posts: 997
Joined: Thu Feb 13, 2014 2:03 pm
Location: Basel, Switzerland // Bremen, Germany
Contact:

Re: Not allowing one certain IP address to see the rest of the network

Mon Oct 08, 2018 2:31 pm

It will. Beacause destination address won't be router's IP. It will be router's mac, but not IP.
It won't. And the router's MAC is not in the game at all.
This will only work if the laptop in question is connected to the router directly (w/o a switch in between) and if "Use IP firewall" is active under bridge settings.
-Chris
 
User avatar
Anumrak
Forum Guru
Forum Guru
Posts: 1174
Joined: Fri Jul 28, 2017 2:53 pm

Re: Not allowing one certain IP address to see the rest of the network

Mon Oct 08, 2018 3:20 pm

It will. Beacause destination address won't be router's IP. It will be router's mac, but not IP.
It won't. And the router's MAC is not in the game at all.
This will only work if the laptop in question is connected to the router directly (w/o a switch in between) and if "Use IP firewall" is active under bridge settings.
-Chris
Do we talking about ARP or some unicast traffic? With ARP it can be a problem I think... So TS have to create drop rule with all IP in his net except his gateway. That would be better

P.S.: didn't get you about switch, because we talked about layer 3.
 
User avatar
cdiedrich
Forum Veteran
Forum Veteran
Posts: 997
Joined: Thu Feb 13, 2014 2:03 pm
Location: Basel, Switzerland // Bremen, Germany
Contact:

Re: Not allowing one certain IP address to see the rest of the network

Mon Oct 08, 2018 3:31 pm

Well, it was talked about L3 communication in the same subnet on the same L2 domain. Which technically makes it L2 communication.
So link-local traffic (i.e. in the same subnet) will not hit the router L3-wise. And L2-wise only if the router is used as a bridge that has to be passed for this communication.
-Chris
 
User avatar
Anumrak
Forum Guru
Forum Guru
Posts: 1174
Joined: Fri Jul 28, 2017 2:53 pm

Re: Not allowing one certain IP address to see the rest of the network

Mon Oct 08, 2018 3:34 pm

Well, it was talked about L3 communication in the same subnet on the same L2 domain. Which technically makes it L2 communication.
So link-local traffic (i.e. in the same subnet) will not hit the router L3-wise. And L2-wise only if the router is used as a bridge that has to be passed for this communication.
-Chris
Oh, I see. Just didn't imagine that he bridged with other users. Then yeah, he could enable split horizon rule in a bridge to isolate Tik's ports between each other or make l2 filtering in a switch, if he has some. But more wise decision is segmenting net to subnets :)
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19325
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Not allowing one certain IP address to see the rest of the network

Mon Oct 08, 2018 10:10 pm

THe information provided is to sparse for me to understand.
Trying to keep it basic:
If the laptop is part of the same lan network 192.168.0.0 then no firewall rules will have any effect as there is direct L2 connectivity.
If the laptop is on a different LAN, then unless the LANs are bridged there should only be connectivity through the router if allowed by rules and thus the laptop can be firewalled off the 192.168.0.0 network.
For instance, one could have a drop forward rule as the last rule in the Forward Chain, and if one didnt explicity allow LANA to LANB traffic etc, it aint going to be allowed.

In other words, without seeing the ops setup (Ip rules) it would be hard to comment further.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11598
Joined: Thu Mar 03, 2016 10:23 pm

Re: Not allowing one certain IP address to see the rest of the network

Mon Oct 08, 2018 10:47 pm

If what OP wrote is read verbatim, then:

laptop with IP address 192.168.0.22
should not see the rest of network 192.168.0.0/24

And that is not possible except in one particular case: that laptop is directly connected to a wired port of RB (and no other device is sharing that port). In this case bridge can be set-up to use FW rules and FW could prohibit said connectivity. But that case would come also with some bad side effects and I wouldn't recommend doing it.

There are other ways of doing it, but I'm not going to suggest any of them. I suggest to @korg to study a few basics about IP addressing, subnetting, routing, etc.
 
WeWiNet
Long time Member
Long time Member
Posts: 597
Joined: Thu Sep 27, 2018 4:11 pm

Re: Not allowing one certain IP address to see the rest of the network

Tue Oct 09, 2018 6:36 pm

As earlier stated: set "Use IP firewall" in the bridge setting, then traffice within bridge will go through Firewall.
Then you can filter it with rules etc.

Or you can do differently :
You can do also "default forward" uncheck (in bridge settings as well), then nobody will be able to talk to each other by default and can get
only internet. You will need to add accept rules if you want to have local traffic (that then should not include that one IP/MAC address you want to isolate).

Who is online

Users browsing this forum: No registered users and 64 guests