Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2]

Author Topic: su - forums # Linux thread!  (Read 2245 times)

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: su - forums # Linux thread!
« Reply #15 on: August 16, 2017, 11:03:50 am »

There's an option under ping to check for local addresses I think, but make sure you toss in the count cap, first time I fucked with it I had to ctrl+c to make it knock that shit off.
Logged

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: su - forums # Linux thread!
« Reply #16 on: August 16, 2017, 03:38:44 pm »

Personally, I would use a static assigned IP address if it were in my network.

If you are plugging foreign devices into somebody else's network, (such as at work), then you are already going to get a network admin breathing hot and angry down your collar.

Exactly where to define the IP address on the Pi depends on what distro you have loaded on the SDCard. 

Between you and me though, I would put it at the very bottom of the IP address pool, where it is very unlikely to ever collide with anything that uses dhcp. Say, 192.168.0.254 for a 192.168.0.X based subnet.

Logged

Starver

  • Bay Watcher
    • View Profile
Re: su - forums # Linux thread!
« Reply #17 on: August 16, 2017, 04:28:11 pm »

The situation was described as going onto a public network (give or take registration/authorisation, if not entirely free(as in speech)-to-use).

I'd be tempted to shell-script something to pick up the IP (e.g., though that may suffer from both-ways NAT, when the truely local RFC1918 address would be a better direct link) and POST that info to a web-resource you control.  The device that wishes to discover what to connect to just queries the external site, reads the "last known location" info and then tries a suitble handshake with that to verify it.

I wouldn't rely on hard-coding any RFC1918 address, TBH. Administrators (knowingly, or just by using the given auto-setup script for the hotspot service) might do all kinds of weird things with the network masks and allowable ranges. You might be able to tinker with successive attempts (or a series of attempts to 'register' as one of several preconceptions until it doesn't seem to bug out) to see what works on a given AP that you can get away with.


(Somewhat the reverse, but with some similarities, twenty+ years ago I had my University account run on login (if detected as on a suitably static workstation) a check of what IP I was logging on from, see if it had a location (room, position in room) recorded in a simple text file and prompt me either to confirm (or note as unreliable) or else provide (if not yet listed) the relevant location info.  Then I could use this same personal lookup file to augment a "where my friends1 are" display, plus a "who else (known or otherwise) is logged in in this room" one. A nice little toy that saved time and did my 1337-h4ck3r cred no harm at all...  ;))


1 I had some. I didn't always know their real names, without fingering their accounts, but they either existed or were very good at Turing Tests. ;)
« Last Edit: August 16, 2017, 04:30:10 pm by Starver »
Logged
Pages: 1 [2]