1
I'm trying to build a tool I can access using my smartphone or laptop to configure, administer, or diagnose equipment in the field where it is difficult to run separate cables and power to work on issues.
I've built an Access point using a Raspberry Pi using LadyADA's tutorial Here and it works well enough. I can access the Pi as an access point and surf the web. However when I try to add the other subnets I need to access I run into problems.
With my interfaces file
auto lo eth0 wlan0
iface lo inet loopback
#iface eth0 inet dhcp
iface eth0 inet static
address 10.2.5.220
netmask 255.255.255.0
network 10.2.5.0
gateway 10.2.5.1
dns-nameservers 10.2.5.227 10.2.5.1 208.67.222.222
post-up /sbin/route add -net 169.254.1.0/24 dev eth0
allow-hotplug wlan0
iface wlan0 inet static
address 10.0.0.1
netmask 255.255.255.0
up iptables-restore < /etc/iptables.ipv4.nat
I'm able to ping a device with an address of 169.254.1.1 from the pi but not from my laptop connected to wlan0.
I'm not sure what I'm doing wrong or missing here. Seems like everything should work, I have the standard iptables rules in place applied with:
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT
As far as I can tell everything is set up correctly. I'm missing either NAT which other than iptables I haven't set up, or an iptables rule.
Ok, turns out it's the link local subnet that is causing the problems. I need to be able to access 169.254.1.1 and my system automatically adds the route 169.254.0.0/16. Logic would suggest this isn't an issue however, it is not properly routed for the device I'm connecting to and since I have a valid address I think my computer is ignoring it completely. I would like to avoid modifying my system as this is meant to be a "universal" tool. Any one have any ideas? – CommGuy – 2014-08-02T10:56:47.790