Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let web UI listen to IPv6 #915

Open
rrooggiieerr opened this issue Sep 13, 2020 · 1 comment · May be fixed by #1136
Open

Let web UI listen to IPv6 #915

rrooggiieerr opened this issue Sep 13, 2020 · 1 comment · May be fixed by #1136
Labels
enhancement New feature or request

Comments

@rrooggiieerr
Copy link

I'm using macOS High Sierra 10.13.6

When not assigning the static 10.0.0.1 IPv4 address to the USB Ethernat gadget interface on my macbook the device gets a link-local address, 169.254.something on IPv4 and fe80::something on IPv6. I can now SSH into the pwnagotchi. This works by using the IPv6 address.

Pinging the IPv4 address, does not work:

ping -c 4 pwnagotchi.local
PING pwnagotchi.local (10.0.0.2): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2

--- pwnagotchi.local ping statistics ---
4 packets transmitted, 0 packets received, 100.0% packet loss

Pinging the IPv6 address, does work:

ping6 -c 4 pwnagotchi.local
PING6(56=40+8+8 bytes) fe80::855:7129:d6e8:173e%en51 --> fe80::3cb2:9aff:fe2b:7183%en51
16 bytes from fe80::3cb2:9aff:fe2b:7183%en51, icmp_seq=0 hlim=64 time=0.631 ms
16 bytes from fe80::3cb2:9aff:fe2b:7183%en51, icmp_seq=1 hlim=64 time=0.631 ms
16 bytes from fe80::3cb2:9aff:fe2b:7183%en51, icmp_seq=2 hlim=64 time=0.908 ms
16 bytes from fe80::3cb2:9aff:fe2b:7183%en51, icmp_seq=3 hlim=64 time=0.849 ms

--- pwnagotchi.local ping6 statistics ---
4 packets transmitted, 4 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 0.631/0.755/0.908/0.125 ms

SSH to the IPv4 address, does not work:

ssh -4 pi@pwnagotchi.local
ssh: connect to host pwnagotchi.local port 22: Network is down

SSH to the IPv6 address, does work:

ssh -6 pi@pwnagotchi.local
pi@pwnagotchi.local's password: 

In summary, it is possible to ping and SSH into pwnagotchi when no fixed IP is configured using IPv6 but not IPv4

It would be great if the web UI could also be connected to, however the web UI is only listening to IPv4 and not IPv6

pi@pwnagotchi:~ $ sudo lsof -i -P -n | grep LISTEN
pwngrid   346    root    7u  IPv4  12909      0t0  TCP 127.0.0.1:8666 (LISTEN)
pwnagotch 386    root    4u  IPv4  14314      0t0  TCP *:8080 (LISTEN) <<< Only listening to IPv4
bettercap 430    root    5u  IPv6  13039      0t0  TCP *:8081 (LISTEN)
bettercap 430    root    6u  IPv6  13050      0t0  TCP *:80 (LISTEN)
sshd      436    root    3u  IPv4  12668      0t0  TCP *:22 (LISTEN)
sshd      436    root    4u  IPv6  12677      0t0  TCP *:22 (LISTEN)
dnsmasq   465 dnsmasq    5u  IPv4  12815      0t0  TCP *:53 (LISTEN)
dnsmasq   465 dnsmasq    7u  IPv6  12817      0t0  TCP *:53 (LISTEN)

The solution would be to have the pwnagotchi web ui also listen to IPv6

I know the instructions say to configure a fixed 10.0.0.1 IPv4 address to the USB Ethernat gadget interface, however there are plenty of cases where this is not convenient, and it would be great to access the web UI without all this configuration work

@rrooggiieerr rrooggiieerr added the enhancement New feature or request label Sep 13, 2020
@MyUsernamee
Copy link

I was having a issue when making my pwnagotchi. I am not the greatest at networking, but my pwnagotchi only used ipv6 and a specific address when plugged into a ethernet cable.

Here is what happens when I ping

ping pwnagotchi

Pinging pwnagotchi.local [fe80::ba27:ebff:fe80:78dc%21] with 32 bytes of data:
Reply from fe80::ba27:ebff:fe80:78dc%21: time<1ms
Reply from fe80::ba27:ebff:fe80:78dc%21: time<1ms
Reply from fe80::ba27:ebff:fe80:78dc%21: time<1ms
Reply from fe80::ba27:ebff:fe80:78dc%21: time<1ms

Even after flashing a new installation, same ip.
So pwnagotchi not being able to listen on ipv6 makes it, I think, impossible to interact with it.

@therocco therocco linked a pull request Jan 21, 2023 that will close this issue
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants