-1

I'm working a project that requires the raspberry pi to be portable, and accessible via SSH (headless setup) in places where there is no internet connection (such as on the top of a hill with no buildings). I have a small low-power router (TP-link wr802n) that I want to use to set up a LAN. I'm having some separate issues SSHing into the Pi over the wireless network (Trouble autoconnecting to wireless network after automounting USB drive) so I'm hoping to connect to it via direct ethernet connection to my mac as a contingency.

However sharing my internet connection over the usual method (system preferences > sharing > share wifi over ethernet) only seems to work when (a) the mac is connected to a wifi network (duh) and (b) when the wifi network is connected to the internet. It does not work when I'm on a wireless local area network that does not have an internet connection (wan), as is typically the case in my situation (this is for a fieldwork research situation in a country with relatively little internet infrastructure).

I suspect this might be an issue with setting up a DHCP server. Do I need to install such a DHCP server on my mac, and how would I configure it to work as needed?

Note: this seems to be a similar issue to this 14 month old unresolved post: SSH Via Ethernet Without Internet Sharing

mtl_zack
  • 1
  • 2
  • Your question tells us what you don't want to do, but you haven't explained your proposed network topology. It is certainly possible to setup a router to provide an isolated local network - but that isn't a Pi question. – Milliways May 30 '18 at 10:01
  • I’m new to using raspberry pi in general, but since my system may align with the experiences of others in the community I was hoping for a constructive response. As you could probably tell, I’m a bit of a noob, but can you tell me what else I should include in an edit, beyond what I’ve already included? – mtl_zack May 30 '18 at 13:46

1 Answers1

0

I would say as a general principle: if the set up is going to be that tricky with this system that is going to be remotely located, why make it more difficult with one additional variable (the presence/absence of a dhcp service somewhere). Just set up the rpi with a static address on a private network (say... inside segment 192.168.197.x/24) so that when you are in front of it you can set up your mac to have another address on the same segment and voila! You can both see each other.

But, just in case, it would help up a lot if you told us how each of the network interfaces of the rpi will be used (wireless? wired? will you use a GSM device for it to connect to internet, perhaps? you will be working with it remotely, do you have a vpn setup so that you can see each other?). Networking is tricky stuff.

eftshift0
  • 750
  • 1
  • 7
  • 12
  • Thank you! I ended up editing ‘’’/etc/dhcpcd.conf’’’ to include static ips to fall back on, on both ‘’eth0’’’ and ‘’’wlan0’’’ interfaces, and I comment out the ‘’’eth0’’’ when I will need to directly connect to my laptop via Ethernet (in situations when I need to use ‘’’apt-get’’’ and connect the pi to the Internet, I tether my phone to my laptop and then share the connection via Ethernet). Normally I would just use wlan in dhcpcd.conf and not bother with eth0 but I am also using this as a mini network accessible storage server and Ethernet connection is necessary to optimize that. – mtl_zack May 31 '18 at 15:12