View Single Post
  #4   (View Single Post)  
Old 14th August 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

Consider: once you alter the MAC address with ifconfig()'s lladdr, the change remains in effect until you reboot or the command is re-issued. You do not want your MAC address randomized if you want repeatable leases on your three standard networks. It should not run before netstart(8).

Run a script to set the MAC address to random, set the SSID, and initiate a DHCP client session when you take your laptop to the untrusted network. Use "join" in hostname.iwn0 only for the three networks where you are able to use the hardware MAC address.

This script can be manually executed, or you could perhaps automate this in an rc.local(8) script, which would be run by rc(8) as a last step, if the script exists. If automated, your script could use ifconfig() to scan for "Guest_Wireless" and if found proceed to issue the appropriate SSID provisioning with ifconfig() and request IP address, routing, and DNS with dhclient(8). If manually executed, it only needs to issue ifconfig and dhclient commands, without any logic.
Reply With Quote