Community discussions

MikroTik App
 
TrinityMH
just joined
Topic Author
Posts: 5
Joined: Sun Aug 01, 2021 6:06 pm

Can't see the internet - 0.0.0.0

Mon May 30, 2022 4:40 am

Hello,

I have a problem with the DHCP server.
I have a device that gets a local DHCP IP address (192.168.10.250). Linux ubuntu is installed on the device.

The problem is that when it configures various programs in ubuntu and gives an IP address of 0.0.0.0 it cannot see the internet. If I configure the program and give it the exact address 192.168.10.250, it works and the internet is there.

What can I do to make my linux see the internet at 0.0.0.0, 127.0.0.1 and localhost?

Let me remind you that when I give the exact address 192.168.10.250, everything works.
Image
 
holvoetn
Forum Guru
Forum Guru
Posts: 5403
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: Can't see the internet - 0.0.0.0

Mon May 30, 2022 6:21 am

You're only showing part of the required settings for DHCP server.
Have you defined an IP pool with address-range which is to be used for the DHCP server to hand out ?

If still having problems, please provide export of your config so we can check where you went wrong.
terminal:
/export hide-sensitive file=anynameyouwish
Extract file to your PC, review for sensitive info (serial number, passwords, MAC address, ...)
Then post contents between [code] quotes.
 
TrinityMH
just joined
Topic Author
Posts: 5
Joined: Sun Aug 01, 2021 6:06 pm

Re: Can't see the internet - 0.0.0.0

Tue May 31, 2022 4:31 am

You're only showing part of the required settings for DHCP server.
Have you defined an IP pool with address-range which is to be used for the DHCP server to hand out ?
Last edited by TrinityMH on Fri Jul 15, 2022 4:37 am, edited 1 time in total.
 
holvoetn
Forum Guru
Forum Guru
Posts: 5403
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: Can't see the internet - 0.0.0.0

Tue May 31, 2022 6:23 am

- Your ether1 interface (I assume that's the one connected to WAN) is not part of the interface list WAN
/interface list member
add interface=ether1 list=WAN
- what are the mark-routing rules for ? Purely VPN ? You only have them defined for 250/251/252 and 243. Everything else will not have them applied. That's intended ?

Can you also provide a diagram of where your device is, what the surrounding network looks like and also clarify further what exactly you are trying to do ?
 
TrinityMH
just joined
Topic Author
Posts: 5
Joined: Sun Aug 01, 2021 6:06 pm

Re: Can't see the internet - 0.0.0.0

Wed Jun 01, 2022 6:17 am

- Your ether1 interface (I assume that's the one connected to WAN) is not part of the interface list WAN
/interface list member
add interface=ether1 list=WAN
Last edited by TrinityMH on Fri Jul 15, 2022 4:38 am, edited 1 time in total.
 
holvoetn
Forum Guru
Forum Guru
Posts: 5403
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: Can't see the internet - 0.0.0.0

Wed Jun 01, 2022 7:55 am

Other attenpt to make you see where I am getting at.

Your firewall rules have some rules specific to WAN.
But your WAN list is empty.
So those rules are not being applied.
Add ether1 to WAN if the idea is to use that setup as router.
 
joegoldman
Forum Veteran
Forum Veteran
Posts: 766
Joined: Mon May 27, 2013 2:05 am

Re: Can't see the internet - 0.0.0.0

Wed Jun 01, 2022 7:58 am

/ip dhcp-server network
add address=0.0.0.0/24 gateway=0.0.0.0 netmask=24
add gateway=0.0.0.1
add address=192.168.10.0/24 gateway=192.168.10.1
I believe these work in order of operation - and if that rule is first it will catch-all and try give a gateway of 0.0.0.0 - which will never work. M ove the 10.0/24 rule (the 3rd one) to the top of the list so it matches first and the client is given 192.168.10.1 as gateway - as then it'll at least have an ARP entry for 192.168.10.1 and can reach it.
 
holvoetn
Forum Guru
Forum Guru
Posts: 5403
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: Can't see the internet - 0.0.0.0

Wed Jun 01, 2022 8:47 am

Good spot.
2 and 3 can even be removed, again if that device is to be used as router.
 
tdw
Forum Guru
Forum Guru
Posts: 1843
Joined: Sat May 05, 2018 11:55 am

Re: Can't see the internet - 0.0.0.0

Wed Jun 01, 2022 12:40 pm

I believe these work in order of operation - and if that rule is first it will catch-all and try give a gateway of 0.0.0.0 - which will never work. M ove the 10.0/24 rule (the 3rd one) to the top of the list so it matches first and the client is given 192.168.10.1 as gateway - as then it'll at least have an ARP entry for 192.168.10.1 and can reach it.
No. Routing decisions are made on a best match basis, this being the smallest subnet within which the target address falls.
For the rules given any destination included in 0.0.0.0/24 will be forwarded to 0.0.0.0, similarly 192.168.10.0/24 to 192.168.10.1, then anything else to 0.0.0.1.

All of these routes are incorrect, directly connected networks will have dynamic routes added automatically, the 0.0.0.0/8 address block is reserved for self-identification and may be handled specially by network stacks. The OP should be fixing the linux installation, trying to 'see the internet at 0.0.0.0, 127.0.0.1 and localhost' is just wrong.
 
TrinityMH
just joined
Topic Author
Posts: 5
Joined: Sun Aug 01, 2021 6:06 pm

Re: Can't see the internet - 0.0.0.0

Thu Jun 02, 2022 3:25 am

I understand, gentlemen. Maybe it is possible to do a workaround? It does not have to be done perfectly. It is important that it only works.

Unfortunately, I know little about networks.



Sorry for typing syntax. I; m using Google Translate.
 
aesmith
Member Candidate
Member Candidate
Posts: 264
Joined: Wed Mar 27, 2019 6:43 pm

Re: Can't see the internet - 0.0.0.0

Fri Jun 03, 2022 2:54 pm

No. Routing decisions are made on a best match basis, this being the smallest subnet within which the target address falls.
For the rules given any destination included in 0.0.0.0/24 will be forwarded to 0.0.0.0, similarly 192.168.10.0/24 to 192.168.10.1, then anything else to 0.0.0.1.
Aren't we at cross purposes, these are DHCP networks not routes? He currently has ..
/ip dhcp-server network
add address=0.0.0.0/24 gateway=0.0.0.0 netmask=24
add gateway=0.0.0.1
add address=192.168.10.0/24 gateway=192.168.10.1
Of which the first and second look meaningless and should be removed.

Which would leave the relevant bits of DHCP server configuration as ...
/ip pool
add name=dhcp_pool10 ranges=192.168.10.2-192.168.10.254

/ip dhcp-server
add address-pool=dhcp_pool10 disabled=no interface=ether2 name=dhcp1

/ip dhcp-server network
add address=192.168.10.0/24 gateway=192.168.10.1
And I think that should work, dishing out addresses from the 192.168.20.x subnet via ether2, and giving the router's own address as default gateway of 192.168.10.1

Whether it will work as a router of not is a different matter and depends on other interfaces, rules, NAT etc.
 
tdw
Forum Guru
Forum Guru
Posts: 1843
Joined: Sat May 05, 2018 11:55 am

Re: Can't see the internet - 0.0.0.0

Fri Jun 03, 2022 4:18 pm

Oops yes, I misread the section. But as you say the gateway=0.0.0.0 and gateway=0.0.0.1 entries make no sense for the DHCP server and should be removed.

Who is online

Users browsing this forum: hatred and 48 guests