I have PiVPN installed on a Raspberry Pi (Buster). I can connect from outside my network to the system without issues, I can see local devices, and the internet is routed through the device (I can surf as if I am in the network.)
However, when I run sudo apt-get update
Err:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
Could not connect to raspbian.raspberrypi.org:80 (93.93.128.193), connection timed out
Err:2 http://archive.raspberrypi.org/debian buster InRelease
Could not connect to archive.raspberrypi.org:80 (176.126.240.86). - connect (110: Connection timed out) Could not connect to archive.raspberrypi.org:80 (176.126.240.84), connection timed out Could not connect to archive.raspberrypi.org:80 (176.126.240.167), connection timed out Could not connect to archive.raspberrypi.org:80 (93.93.135.117), connection timed out Could not connect to archive.raspberrypi.org:80 (93.93.135.118), connection timed out Could not connect to archive.raspberrypi.org:80 (46.235.231.145), connection timed out Could not connect to archive.raspberrypi.org:80 (46.235.230.122), connection timed out Could not connect to archive.raspberrypi.org:80 (46.235.231.111), connection timed out Could not connect to archive.raspberrypi.org:80 (46.235.231.151), connection timed out Could not connect to archive.raspberrypi.org:80 (46.235.227.39), connection timed out
Reading package lists... Done
W: Failed to fetch http://raspbian.raspberrypi.org/raspbian/dists/buster/InRelease Could not connect to raspbian.raspberrypi.org:80 (93.93.128.193), connection timed out
W: Failed to fetch http://archive.raspberrypi.org/debian/dists/buster/InRelease Could not connect to archive.raspberrypi.org:80 (176.126.240.86). - connect (110: Connection timed out) Could not connect to archive.raspberrypi.org:80 (176.126.240.84), connection timed out Could not connect to archive.raspberrypi.org:80 (176.126.240.167), connection timed out Could not connect to archive.raspberrypi.org:80 (93.93.135.117), connection timed out Could not connect to archive.raspberrypi.org:80 (93.93.135.118), connection timed out Could not connect to archive.raspberrypi.org:80 (46.235.231.145), connection timed out Could not connect to archive.raspberrypi.org:80 (46.235.230.122), connection timed out Could not connect to archive.raspberrypi.org:80 (46.235.231.111), connection timed out Could not connect to archive.raspberrypi.org:80 (46.235.231.151), connection timed out Could not connect to archive.raspberrypi.org:80 (46.235.227.39), connection timed out
W: Some index files failed to download. They have been ignored, or old ones used instead.
Pinging an external DNS-Server ping -c 3 -W 2 8.8.8.8
doesn't work
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
ping: sendmsg: Operation not permitted
ping: sendmsg: Operation not permitted
ping: sendmsg: Operation not permitted
UFW is installed sudo ufw status
Status: active
To Action From
-- ------ ----
22 ALLOW Anywhere
22/tcp ALLOW Anywhere
1194/udp ALLOW Anywhere
DNS ALLOW Anywhere
80/tcp ALLOW Anywhere
22 (v6) ALLOW Anywhere (v6)
22/tcp (v6) ALLOW Anywhere (v6)
1194/udp (v6) ALLOW Anywhere (v6)
DNS (v6) ALLOW Anywhere (v6)
80/tcp (v6) ALLOW Anywhere (v6)
Anywhere ALLOW OUT Anywhere on tun0
192.168.5.0/24 ALLOW OUT Anywhere on eth0
Anywhere (v6) ALLOW OUT Anywhere (v6) on tun0
IPv4 is being forwarded sudo sysctl -p
net.ipv4.ip_forward = 1
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
Nameserver are set correct cat /etc/resolv.conf
(first is PiHole, second is Router)
# Generated by resolvconf
nameserver 192.168.5.2
nameserver 192.168.5.1
ICMP rules are allowed as by default. cat /etc/ufw/before.rules
# ok icmp codes for INPUT
-A ufw-before-input -p icmp --icmp-type destination-unreachable -j ACCEPT
-A ufw-before-input -p icmp --icmp-type time-exceeded -j ACCEPT
-A ufw-before-input -p icmp --icmp-type parameter-problem -j ACCEPT
-A ufw-before-input -p icmp --icmp-type echo-request -j ACCEPT
# ok icmp code for FORWARD
-A ufw-before-forward -p icmp --icmp-type destination-unreachable -j ACCEPT
-A ufw-before-forward -p icmp --icmp-type time-exceeded -j ACCEPT
-A ufw-before-forward -p icmp --icmp-type parameter-problem -j ACCEPT
-A ufw-before-forward -p icmp --icmp-type echo-request -j ACCEPT
Can you give me a hint, what went wrong? Linux and Networks are not really my field of expertise.