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.

Araf
  • 231
  • 1
  • 2
  • 7

1 Answers1

6

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
Araf
  • 231
  • 1
  • 2
  • 7
  • 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 07:15
  • You don't need the comma + IP, just specifying the CIDR works fine `address1=192.168.0.1/24` (as per [NetworkManager reference](https://developer.gnome.org/NetworkManager/stable/nm-settings-keyfile.html)) – 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