OPI Zero H2 Hotspot working but no internet

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
jdPerea
Posts: 1
Joined: Fri Dec 21, 2018 11:53 pm

OPI Zero H2 Hotspot working but no internet

Post by jdPerea »

Hi

I installed the dietpi script in a Orange Pi Zero (H2+) and, after a few initial problems, I got it working great.
But when I installed the access point hotspot it finished the installation correctly... but it's not working properly.

I can access to the access point, have an IP and make ping to other devices in the same WLAN, but I can't reach the LAN nor Internet.

Is very strange because it seems the device is not natting and when I check iptables it shows the rules to route the traffic and making nat (MASQUERADE rule). Also I uncommented the line to make ip forward in sysctl.conf.


Finally I tried to convert the hotspot into TOR access point to see if it could change anything... but sadly not.


I'm sorry but I have no idea about why is happening this. Any help will be wellcome


Here's some output

Ping to other device in the same WLAN

Code: Select all

dietpi@DietPi:~$ ping -I wlan1 192.168.42.10
PING 192.168.42.10 (192.168.42.10) from 192.168.42.1 wlan1: 56(84) bytes of data.
64 bytes from 192.168.42.10: icmp_seq=1 ttl=64 time=26.3 ms
64 bytes from 192.168.42.10: icmp_seq=2 ttl=64 time=4.94 ms
64 bytes from 192.168.42.10: icmp_seq=3 ttl=64 time=80.4 ms
64 bytes from 192.168.42.10: icmp_seq=4 ttl=64 time=100 ms
64 bytes from 192.168.42.10: icmp_seq=5 ttl=64 time=4.85 ms
64 bytes from 192.168.42.10: icmp_seq=6 ttl=64 time=83.3 ms
^C
--- 192.168.42.10 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5006ms
rtt min/avg/max/mdev = 4.850/50.045/100.286/39.148 ms
Ping to google through ethernet working

Code: Select all


dietpi@DietPi:~$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=121 time=16.4 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=121 time=14.5 ms
^C
--- 8.8.8.8 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 14.563/15.506/16.449/0.943 ms


Ping to google through wifi interface not working

Code: Select all

dietpi@DietPi:~$ ping -I wlan1 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 192.168.42.1 wlan1: 56(84) bytes of data.
^C
--- 8.8.8.8 ping statistics ---
16 packets transmitted, 0 received, 100% packet loss, time 15338ms

dietpi@DietPi:~$ ping -I wlan1 192.168.100.189
PING 192.168.100.189 (192.168.100.189) from 192.168.42.1 wlan1: 56(84) bytes of data.
^C
--- 192.168.100.189 ping statistics ---
16 packets transmitted, 0 received, 100% packet loss, time 15359ms
Ping to ethernet iface IP from wifi not working

Code: Select all

dietpi@DietPi:~$ ping -I wlan1 192.168.100.189
PING 192.168.100.189 (192.168.100.189) from 192.168.42.1 wlan1: 56(84) bytes of data.
^C
--- 192.168.100.189 ping statistics ---
16 packets transmitted, 0 received, 100% packet loss, time 15359ms

iptables output

Code: Select all


dietpi@DietPi:~$ sudo iptables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
dietpi@DietPi:~$ sudo iptables -t nat -S
-P PREROUTING ACCEPT
-P INPUT ACCEPT
-P OUTPUT ACCEPT
-P POSTROUTING ACCEPT
-A PREROUTING -i wlan1 -p tcp -m tcp --dport 22 -j REDIRECT --to-ports 22
-A PREROUTING -i wlan1 -p udp -m udp --dport 53 -j REDIRECT --to-ports 53
-A PREROUTING -i wlan1 -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j REDIRECT --to-ports 9040
dietpi@DietPi:~$ 
[code/]
User avatar
WarHawk
Posts: 606
Joined: Thu Jul 20, 2017 8:55 am

Re: OPI Zero H2 Hotspot working but no internet

Post by WarHawk »

Do you have NAT at all?

http://itfanatic.com/index.html%3Fq=node%252F84.html

From that link above

Code: Select all

iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i eth0 -o wlan0 -j ACCEPT
Post Reply