Can't see the internet - 0.0.0.0

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.

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.

  • 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 ?

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.

/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.

Good spot.
2 and 3 can even be removed, again if that device is to be used as router.

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.

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.

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.

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.