Getting rid of 192.168.50/24 network


can someone enlighten me on how to get completely rid of the process inserting the 192.168.50/24 network on wlan0 when using the raspberry pi image of webcontrol?! I did remove /boot/webdingens_wpa_supplicant.conf, disabled p2p and removed hostapd service.


the intent was that if no wpa_supplicant was supplied then the rpi would run in host access point mode (hostapd) so you could join its network. Are you just wanting to turn that off?

sudo apt-get remove hostapd

that would stop it, but I’m not sure if it would disrupt anything else.

I do have a wpa-supplicant.conf which works but the 192.168.50/24 net still gets constantly inserted. I can delete it via “route del -net” but just a couple seconds later its back. And i cant find neither where this is configured nor which process inserts it. Probably networking service but i still cant find where its exactly configured.

And hostapd had already been removed.

I’d be interested to learn how to fix it when you figure it out. I’m at a loss beyond this, so not much help here. Sorry.

I did give up after 5 hours of searching where this darn address/net is configured. IMO its compiled into the kernel or a service. It still got injected into the routing table even after i did remove hotspot, avahi-daemon, dhcpd, dnsmasq and hostapd services. If this is indeed hardcoded i suggest to remove it and replace it with a config which actually can be changed if required.

Now installing raspbian 10.1 lite which should be the version used by the webcontrol image and then i will install webcontrol “by hand”.

what is the contents of /etc/network/interfaces ?

that’s what sets up your network (unless you have Network Manager running and
doing things, but even there, the interfaces need to be configured for it in
the interfaces file)

David Lang

The point is that the wifi worked until the p2p network/ip address got inserted into the routing table out of nowhere. This is compiled into the kernel, a service or a bootup script, right?! No file in “/etc” or “/var” contains “192.168.50”.

I did try with and without /etc/network/interfaces but it should not destroy a working wifi connection and thats what it did.

there is nothing special about 192.168.50/24. it’s not compiled in to anything.
It’s either in a config file or the system is getting it via DHCP.

there is an IP range reserved for ad-hoc networks, but it’s a 168.* address

what did you do to search for 192.168.50 under /etc and /var?

David Lang

Well, it is “special” because i could not get rid of it. And i am “doing linux” for 30 years plus. Check the list of services i did not only stop but completely de-install. I did use “find . -print | xargs -ifile fgrep “192.168.50” file” on those directories. I also used the same command but did do a “strings” command on the files and then the “grep”.

So, how does one switch this feature off and where is it configured?!

And IMO its NOT in a config file. At least not in any place where a config file should be.

I have never run into this, I really don’t think it’s as simple as a feature to
turn off.

systemd and network manager have been putting stuff in odd places, so I would do
a recursive grep across the entire system.

I’m curious what the routing table looks like, what does netstat -nr show and
what does ifconfig -a show?

are you running the docker version by any chance? it could be an internal
network created for docker.

David Lang

netstat -rn

did show “my network” with a default route and the “192.168.50/24” with a default route attached. Therefore messing up my networking. Ifconfig did show only “my network/ip address” correctly configured on wlan0. I could do a “route del -net” so ip connectivity had been restored but the network would get re-inserted within about one minute.

IP connectivity worked as long as the 192.168.50/24 hadnt been inserted again.

And config files only belong into /etc and /usr/local/etc.

config files may only belong in /etc but it’s no longer true that that is the
only place they exist.

if the route is being added back, then you have a service running that’s doing

what interface is the incorrect default router pointing at? is it wlan0? what is
the actual gateway defined

I am not seeing the results of the netstat posted in this thread.

David Lang

config files may only belong in /etc but it’s no longer true that that is the
only place they exist.[/quote]

True, but placing them elsewhere is “bad style”.

if the route is being added back, then you have a service running that’s doing

Yep, most probably the networking service because i did kill/deinstall avahi, dhcpcd, dnsmasq. hostapd and hotspot.

[quote]what interface is the incorrect default router pointing at? is it wlan0? what is
the actual gateway defined[/quote]

wlan0, gw had been dev wlan0.

I did trash the installation and did install raspbian 10.1 (or 10.01) which should be the version the webcontrol image uses so i can hopefully install a working version of webcontrol from binary or source. Therefore i can’t copy/paste the result anymore.

I’m not exactly sure what your problem is with that IP, it should only be used when the AP mode is activated. It might still “listen” on that IP when connected on another network, but that shouldn’t affect anything, as long as it doesn’t set that as the source IP when sending packets.

In any case, it came from the base image builder I used to create the Raspberry Pi image. More specifically, this file: CustomPiOS/autohotspotN at master · guysoft/CustomPiOS · GitHub

If you want to get rid completely of the auto-hotspot feature, you can remove it from the image build config here: webcontrol-pi/config at master · WebControlCNC/webcontrol-pi · GitHub

1 Like