I’ve reinstalled OSMC alpha 4 on the Pi 2. I’ve been trying to connect my ethernet ready TV to the internet using the Raspberry Pi 2.
The tutorial I followed used an interfaces file in /etc/network. However, I understand from Sam that the file used here is ConnMan under /etc rather than interfaces.
I’m manually allocating the following IPs: eth0 192.168.2.1 netmask 255.255.255.0; wlan0 192.168.15.1. netmask 255.255.255.0.
My sysctl returns net.ipv4.ip_forward = 1. Pinging 192.168.2.2 and pinging 192.168.15.1 both work fine and there’s no packet loss. TV has a manual IP set as 192.168.2.2.
netstat -rn output:
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.15.1 0.0.0.0 UG 0 0 0 wlan0
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.15.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
192.168.15.1 0.0.0.0 255.255.255.255 UH 0 0 0 wlan0
iptables -v -L output:
Chain INPUT (policy ACCEPT 366 packets, 36259 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- eth0 wlan0 anywhere anywhere
0 0 ACCEPT all -- wlan0 eth0 anywhere anywhere state RELATED,ESTABLISHED
Chain OUTPUT (policy ACCEPT 220 packets, 25304 bytes)
pkts bytes target prot opt in out source destination
iptables -t nat -v -L output:
Chain PREROUTING (policy ACCEPT 9 packets, 2048 bytes)
pkts bytes target prot opt in out source destination
Chain INPUT (policy ACCEPT 9 packets, 2048 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 50 packets, 4245 bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 9 packets, 524 bytes)
pkts bytes target prot opt in out source destination
110 9004 SNAT all -- any wlan0 anywhere anywhere to:192.168.15.6
0 0 SNAT all -- any wlan0 anywhere anywhere to:192.168.15.6
The eth0 tcpdump on the pi and ping from laptop returns:
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel
However, other times it returned:
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
^C20:15:58.071481 IP Brunos-MacBook-Pro.local > osmc.local: ICMP host 192.168.2.11 unreachable, length 36
1 packet captured
2 packets received by filter
1 packet dropped by kernel
The Pi wlan0 tcpdump returns the following when pinging 8.8.8.8 from the laptop:
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wlan0, link-type EN10MB (Ethernet), capture size 262144 bytes
^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel
1 packet dropped by interface
On all occasions I have to halt the tcpdump on the pi with ctrl+C.
How can I get the 192.168.15.1 network to provide an internet connection to the TV on 192.168.2.2 and have this automated?
Also, thank you Sam and Mariusz for getting me this far as I clearly have limited command of the Pi!