0

Hey I'm trying to set up a hotspot to have internet on my phone while I'm waiting for my router to arrive.
I'm only allowed to use a small set of IP addresses though: x.x.x.128 - x.x.x.135

What I tried so far was:
nmcli d wifi hotspot ifname wlp5s0 con-name archspot ssid archspot password "il_keep_this_one_for_myself"
and:
nmcli c m archspot ipv4.addresses x.x.x.130\24 ipv4.gateway x.x.x.1

But when I connected with my phone, it got assigned x.x.x.51
How can I specify which range of IPs it should assign?

edit: I'm living in a student dorm which is using a city-wide science network including a NAT-gateway to get to the internet. Every apartment is assigned a set of IP addresses that it has to use. What I have are: the ip range, the network mask 255.255.255.0(thus the /24), the default gateway, and some dns servers which I am not using.

iaquobe
  • 281
  • 1
  • 4
  • 13
  • wouldn't 128-135 be something closer to /29 rather than /24? Or are you bridging? If so why hand out IP addresses at all and just let the normal subnet DHCP server do it for you – hardillb Oct 07 '19 at 11:52
  • I just tried without setting any addresses. But now my phone got an address outside the range I was explicitly told to use. – iaquobe Oct 07 '19 at 12:11
  • Without knowing a LOT more about exactly you have been told and exactly how the networking is set up on the device running the AP we really can't help here. I would suggest your best bet is to have the AP run a totally separate IP range and NAT to the host network. – hardillb Oct 07 '19 at 12:15
  • I don't know if that qualifies as LOT but I added some more info. I also don't know if I'm allowed to assigning a totally different IP range. – iaquobe Oct 07 '19 at 12:30

1 Answers1

0

OK, simplest solution here, set up your wireless network with a rfc 1918 subnet that doesn't clash with the universities range.

Give the AP an IP address in the range given to you by the university attached to the ethernet interface you are plugging into the wall.

Set the AP up to NAT from the RFC 1918 range to the ethernet device.

This way the university network will only see the one IP address in the required range, and you can connect as many wifi devices as you want to the AP.

This question should help with the required nmcli commands for the AP.

hardillb
  • 408
  • 2
  • 10