6

I am trying to setup a WiFi hotspot on Ubuntu 16.04. Everything is working, and clients are able to connect to the hotspot.

How do I change the IP address that my hotspot is assigned? Right now, I am assigned 10.42.0.1 but say I want 192.168.0.1 instead.

I tried adding the following to my /etc/network/interfaces file:

auto wlan0
iface wlan0 inet static
address 192.168.0.1
netmask 255.255.255.0

But I am still assigned the same IP address.

2
  • You can change the IP of your hotspot by editing the hotspot config in settings and changing the IPv4 Settings. Sep 15 '17 at 15:19
  • The hotspot is likely created using hostapd, so look at the config files for hostapd...
    – dirkt
    Sep 17 '17 at 13:40
4

The solution was adding the following line to my hotspot config file /etc/NetworkManager/system-connections/myHotspot in the ipv4 block:

address1=192.168.0.1/24,192.168.0.1
3
  • 1
    Confirmed working on Kubuntu 16.04. Note after setting IP you need to restart network-manager using sudo systemctl restart network-manager.service.
    – admin
    Aug 10 '18 at 7:15
  • You don't need the comma + IP, just specifying the CIDR works fine address1=192.168.0.1/24 (as per NetworkManager reference)
    – earcam
    Dec 14 '18 at 18:51
  • this solution does not seem to work with 172.16.0.1/24 subnet, which is a valid private subnet..
    – Pa_
    Mar 18 '19 at 16:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.