I am confused how this works. When i connect to the pwnagotchi i am using the USB ethernet connection. This is the only way, other than bluetooth, that i can connect to it. When i do so my wireless connection on my laptop drops. How do i share the internet connection with pwnagotchi.
Have you followed the Linux host instructions on the website?
I believe this issue is the reason for the existence of the linux_connection_share.sh script, the purpose should be to bridge the two connections together.
You can clone the pwnagotchi repo via
git clone https://github.com/evilsocket/pwnagotchi.git, plug in the pwnagotchi, and then go into the pwnagotchi/scripts folder and run the linux_connection_share.sh script on your host.
Thanks for this. It seems as though I have it working but I cannot ping from pwnagotchi while connected via SSH. I am using ubuntu and I now show 2 connections; one for wifi and one for the USB connection labelled enp0s20u3. This is the value I typed into the linux_connection_share.sh file. I must still be missing something. Thanks in advance for the help.
I fixed my own problem. I needed to update both connections in the .sh file. I am now pinging away.
Hi guys i am a total noob in programming and i am stuck.
- Pwnagotchi runs via USB in manu mode
- SSH runs between Host via USB to Pwnagotchi
- Implementing linux_connection_share.sh doesnt work
i get this error:
RTNETLINK answers: File exists
what i should change in this script?
name of the ethernet gadget interface on the host
host interface to use for upstream connection
ip addr add “$USB_IFACE_IP/24” dev “$USB_IFACE”
ip link set “$USB_IFACE” up
iptables -A FORWARD -o “$UPSTREAM_IFACE” -i “$USB_IFACE” -s “$USB_IFACE_NET” -m conntrack --ctstate NEW -j ACCEPT
iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
iptables -t nat -F POSTROUTING
iptables -t nat -A POSTROUTING -o “$UPSTREAM_IFACE” -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
Thanks for everyone supporting this cool project!
After face palming myself, i found a solution her:
Forgot to put an DNS mask on it in “Networksettings” --> “22.214.171.124” added and its works!