2

I am trying to create what is essentially a home router with nmcli. I would like the client devices that connect to be on the same subnet regardless of whether they connect with ethernet or wifi. However when I create my wifi hotspot it creates its own subnet behind a nat. So the devices on the Ethernet are not able to access the devices that are connected via wifi.

The command I am using to create the wifi hotspot is

nmcli c add type wifi ifname wlan0 con-name test autoconnect no ssid test -- 802-11-wireless.mode ap ipv4.method shared 802-11-wireless.band bg 802-11-wireless.channel 6 802-11-wireless-security.key-mgmt wpa-psk 802-11-wireless-security.psk MyPassword

I have tried several things to get this working.

First i tried to switch the ipv4.method to auto, however this forces the connection to never start. Then I tried to create a bridge between Ethernet and the WiFi, however it looks like ap mode does not support bridges in Ubuntu. Everyone, seems to be setting up just a natted access point.

Does anyone have an idea how I can set up an access point that does not create its own nat and subnet?

3
  • On my LAN I set up the wireless router as a switch, basically disabling the router stuff. For admin access, it has a static IP address on my LAN sub-net, but outside of the DHCP pool. Everything wired or wireless on my LAN is all on one sub-net. – Doug Smythies Apr 4 '17 at 17:12
  • Do you know how to do this using nmcli. That is what I am using to set up the "router" – nbroeking Apr 4 '17 at 21:13
  • Sorry, I do not know how to use nmcli (or network manager either), as I am a server person. – Doug Smythies Apr 4 '17 at 21:52
-1

Your command is not correct. Try this

nmcli c add type wifi ifname wlan0 con-name test autoconnect no ssid test
nmcli connection modify sentinel 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared
nmcli connection up test
1
  • 1
    This method creates a new NAT'ed network instead of extending an existing one to WiFi. – fallingcats Dec 22 '19 at 17:15

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.