On Sunday, 17 June 2018 18:42:53 BST Ralph Corderoy wrote:
> If you're on the Pi trying to ping 8.8.8.8 with eth0 plugged in, giving
> the winning metric-202 default route, then your packet is going to
> travel out of eth0 addressed to outdoor-wap's 192.168.0.1-interface's
> Ethernet address.  That seems the first odd thing to investigate.

I spent most of yesterday afternoon grappling with this.  At first, because the 
problem was 
related to routes, I assumed that I had introduced the problem when I set up 
the routing 
using IP Tables.  It took me a while to discover how to delete and / or flush 
rules from the 
IP Tables (because simply deleting the file contain the rules didn't change 
anything).

Then it dawned on me that if deleting all of the routes and rebooting didn't 
solved the 
problem, then it probably wasn't iptables that was causing it.

I then stumbled across a 6-year old page (http://qcktech.blogspot.com/) that 
discussed 
how to set up a wired router on a Raspberry Pi.  The problem being solved was 
identical 
(eg AP connected to the RPi's Router port and the other side connected to the 
ISP's ADSL 
Router).  Unfortunately this method set up the static IP address using 
/etc/Network/
interfaces, which in the modern versions of Raspbian contains a message to use 
dhcpcd.conf instead. Nonetheless I gave it a try and achieved connectivity from 
the Pi 
(browser and ping) to the Internet, but not from the AP to the RPi.  In the 
Pi's desktop, the 
Network icon displays 'Connection to DHCP lost' and no interfaces when hovered 
over.   
Here is the config I'm using:

# interfaces(5) file used by ifup(8) and ifdown(8)

auto lo
iface lo inet loopback

#USB NIC connecting to the Internet
auto eth1
iface eth1 inet dhcp

#Onboard NIC serving as internal gateway
auto eth0
iface eth0 inet static
address 192.168.0.9
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.9
I tried setting the gateway address to the AP instead of the RPi, but to no 
avail.  I also took 
out the static address entries for eth0 from dhcpcd.conf, but also without luck.

I then studied the man page for dhcpcd.conf, but was unable to see how to 
exactly 
replicate the settings in 'interfaces'.  It seems to me that the problem might 
be that I'm 
conflicting the settings that dhcpcd.conf is adding with those from interfaces, 
but I can't 
see where or how to stop it.

I'm off to WMT shortly and won't get back onto this until this afternoon.  My 
biggest 
problem is that most sites that explain how to set up an RPi as a wired Router 
seem to be 
old (at least I couldn't find any newer ones).  That is why I adapted the 
instructions from 
the original site to develop my first attempt.  These were in a link from the 
NoDogSplash 
instructions at https://pimylifeup.com/raspberry-pi-wireless-access-point/.

-- 



                Terry Coles
-- 
Next meeting:  Bournemouth, Tuesday, 2018-07-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue     / TO THE LIST OR THE AUTHOR

Reply via email to