Community discussions

MikroTik App
 
aesmith
Member Candidate
Member Candidate
Topic Author
Posts: 264
Joined: Wed Mar 27, 2019 6:43 pm

Does "Detect Internet" actually do anything?

Tue Oct 20, 2020 7:09 pm

I'm not sure I've seen a straight answer to this, but I'm trying to find out whether "Detect Internet" actually does anything that influences the router's behaviour. The only effect that I think I've seen is on the Mikrotik mobile app where it determines whether the app shows a graph or Internet activity or not. Can the detected statuses actually be used in routing, firewall, NAT or other rules?
 
nostromog
Member Candidate
Member Candidate
Posts: 226
Joined: Wed Jul 18, 2018 3:39 pm

Re: Does "Detect Internet" actually do anything?

Tue Oct 20, 2020 7:33 pm

You can control what it does with the lists:
> /interface detect-internet print 
    detect-interface-list: WAN
       lan-interface-list: none
       wan-interface-list: none
  internet-interface-list: none
The manual explains how the states change. Now, it will run the detection on interfaces that are in the "detect-interface-list", and, depending of the state, add them to the differen <state>-interface-list. The idea is that you can use those lists in your firewall, etc.

You can check the current state with something like
> /interface detect-internet state print 
 # NAME                                                                         STATE    STATE-CHANGE-TIME    CLOUD-RTT           
 0 ether1                                                                       internet sep/17/2020 08:38:17 68ms                
 1 ether2                                                                       internet sep/17/2020 08:37:17 73ms                
 2 sit1                                                                         no-link  sep/14/2020 05:22:55
(This is an example from a router with two connections and an inactive ipv6 tunnel...)
 
aesmith
Member Candidate
Member Candidate
Topic Author
Posts: 264
Joined: Wed Mar 27, 2019 6:43 pm

Re: Does "Detect Internet" actually do anything?

Tue Oct 20, 2020 7:46 pm

Thanks, I was already reasonably clear on all that, however I still can't see where the status is used. I can't see how for example you apply a filter, NAT or mangle rule based on detected status of "internet". The match address list options only offer the statically defined lists, or some functional options like "all" or "dynamic". Could you help me out with an example of a rule that takes effect only if the interface has detected status "internet"?
 
aesmith
Member Candidate
Member Candidate
Topic Author
Posts: 264
Joined: Wed Mar 27, 2019 6:43 pm

Re: Does "Detect Internet" actually do anything?

Tue Oct 20, 2020 8:38 pm

Actually I think I may have worked it out. Say I create a new Interface List "INTERNET-DETECTED", and set that in the Detect Internet settings, theoretically it should add the interface into that list, and I would match my rules against the list "INTERNET-DETECTED". Does that sound right? And does it also move the interface out of any other statically defined list(s)? I'm not quite clear whether an interface can be a member or more than one list at a time.
Thanks Tony S
 
Sob
Forum Guru
Forum Guru
Posts: 9121
Joined: Mon Apr 20, 2009 9:11 pm

Re: Does "Detect Internet" actually do anything?

Wed Oct 21, 2020 6:43 am

Same interface can be in multiple lists. And yes, you can use these lists in firewall rules. Question is, what useful thing can you actually do with it? I wonder about that myself.

It's quite understandable to treat LAN and WAN differently, typically to have access from WAN more limited. But assignment of that tends to be static. Even if you accidentally plug cable in wrong port, it won't change from one to the other, because it won't have proper config for that. Your LAN port won't accidentally become WAN. And even though WAN port may lose internet access, you still want to keep all protection, simply because it's connected to upstream router and potentially dangerous network.

The difference between WAN (port that may have internet access) and Internet (port that actually has internet access), that sounds as something that could be useful. It would be nice to have such info in routes. But in firewall? What could I want to do with one that I wouldn't want to do with the other? I'd like to hear some good example.
 
aesmith
Member Candidate
Member Candidate
Topic Author
Posts: 264
Joined: Wed Mar 27, 2019 6:43 pm

Re: Does "Detect Internet" actually do anything?

Wed Oct 21, 2020 9:37 am

I need to think a bit about lists. I have a router that will have three potential Internet connections, one needs NAT and firewall, one just needs firewall, and the third doesn't need either (the LTE has it's own firewall).
 
godel0914
Frequent Visitor
Frequent Visitor
Posts: 66
Joined: Mon Dec 31, 2018 12:59 am
Location: Formosa

Re: Does "Detect Internet" actually do anything?

Tue Apr 02, 2024 9:50 am

Does anyone have an idea how Mikrotik detect Internet judge WAN or LAN, please?
My sfp1, sfp2, sfp3 are my WAN1, WAN2, WAN3 but sfp3 being detected as LAN...
Capture.JPG
You do not have the required permissions to view the files attached to this post.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26379
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Does "Detect Internet" actually do anything?

Tue Apr 02, 2024 10:32 am

Here are the rules that are used for detection: https://help.mikrotik.com/docs/display/ ... t+Internet

Yes, it is used to automatically populate interface lists. For example if you accidentally plug in a cable with internet access, you might open up your router to unrestricted access from the internet. This can prevent it, if it detects, that the newly active interface has internet access, your firewall rulrs will automatically protect it.
 
godel0914
Frequent Visitor
Frequent Visitor
Posts: 66
Joined: Mon Dec 31, 2018 12:59 am
Location: Formosa

Re: Does "Detect Internet" actually do anything?

Tue Apr 02, 2024 11:54 am

Here are the rules that are used for detection: https://help.mikrotik.com/docs/display/ ... t+Internet

Yes, it is used to automatically populate interface lists. For example if you accidentally plug in a cable with internet access, you might open up your router to unrestricted access from the internet. This can prevent it, if it detects, that the newly active interface has internet access, your firewall rulrs will automatically protect it.
I read that document, but it didn't tell how it judge LAN or WAN, only said interfaces can reach cloud.mikrotik.com using UDP protocol port 30000 can obtain "Internet status". (My sfp1 & sfp2 marked as Internet correctly)

My sfp3 set up as WAN3 being detected as LAN, and BridgeLAN and Ether5 being detected as WAN, while they are all LAN.
Capture.JPG
You do not have the required permissions to view the files attached to this post.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26379
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Does "Detect Internet" actually do anything?

Tue Apr 02, 2024 12:01 pm

Apparently RouterOS was able to reach internet though those interefaces. Maybe your bridge setup is incorrect or something else is wrong
 
godel0914
Frequent Visitor
Frequent Visitor
Posts: 66
Joined: Mon Dec 31, 2018 12:59 am
Location: Formosa

Re: Does "Detect Internet" actually do anything?

Tue Apr 02, 2024 12:29 pm

Apparently RouterOS was able to reach internet though those interefaces. Maybe your bridge setup is incorrect or something else is wrong
I have my trust in RouterOS, therefore i am looking my settings for mistakes. It would be better for me to find them if i can know under what circumstance the interface will be judged as LAN or WAN. (I already know when will be judged as Internet according to your share knowledge base)

My bridge setup is simple, just put together all LAN ethernet ports. Ether4 & Ether5 are on a PowerEdge Server running windows server.

sfp3 is a WAN and capable of accessing Internet, even not, at least a WAN, but judged as a LAN.
Capture1.JPG
Capture.JPG
You do not have the required permissions to view the files attached to this post.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11624
Joined: Thu Mar 03, 2016 10:23 pm

Re: Does "Detect Internet" actually do anything?

Tue Apr 02, 2024 3:12 pm

As @normis said: this function is intended to detect (and autoconfigure to certain extent) WAN-facing interfaces (which is a very good thing). However, the experience is that detection success rate is lower than we would all love to see and when it fails, then the whole router starts to behave in random unexpected ways. Which means that if the router is administered at least half decently (which includes some thought when plugging in any data cable), its mostly better to disable the feature ... Specially so as it relies on setup which closely resembles (or builds on) default setup. If somebody tears it apart, then leaving detect-internet enabled doesn't make any sense what so ever.
 
godel0914
Frequent Visitor
Frequent Visitor
Posts: 66
Joined: Mon Dec 31, 2018 12:59 am
Location: Formosa

Re: Does "Detect Internet" actually do anything?

Wed Apr 03, 2024 8:36 am

As @normis said: this function is intended to detect (and autoconfigure to certain extent) WAN-facing interfaces (which is a very good thing). However, the experience is that detection success rate is lower than we would all love to see and when it fails, then the whole router starts to behave in random unexpected ways. Which means that if the router is administered at least half decently (which includes some thought when plugging in any data cable), its mostly better to disable the feature ... Specially so as it relies on setup which closely resembles (or builds on) default setup. If somebody tears it apart, then leaving detect-internet enabled doesn't make any sense what so ever.
The detection results apparently also applied to Quickset, i am troubleshooting why when i added sfp3 (WAN3), then my LAN (use default 192.168.88.1) will be replaced by the new WAN3 IP. It offers a very good insight since it also list every interfaces attribute (WAN or LAN).

Especially the bandwidth usage diagram on Android phone are rather pretty and useful, i can't resist to try to make it work.
Capture.JPG
You do not have the required permissions to view the files attached to this post.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26379
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Does "Detect Internet" actually do anything?

Wed Apr 03, 2024 8:42 am

Most likely your setup is too customized for this feature to be useful to you. Just disable internet detection and put the interfaces where you need them. Manually.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19352
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Does "Detect Internet" actually do anything?

Wed Apr 03, 2024 2:18 pm

RoS feature I would quietly retire.
 
llamajaja
Member Candidate
Member Candidate
Posts: 198
Joined: Sat Sep 30, 2023 3:11 pm

Re: Does "Detect Internet" actually do anything?

Wed Apr 03, 2024 9:37 pm

Normis, on a side note, does RoS use the input chain default rule dst-address=127.0.0.1 for anything other than internal capsman use?????

Who is online

Users browsing this forum: Bruzxce, Pilo2710, unhuzpt and 52 guests