Comments (7)
I've not seen this as an issue. Are you sure you are connecting to the OTG port. Only one of them provides power and data lanes. The other only provides power. In every test I've done, OTG USB connectivity is available right out of the box.
from pwnagotchi.
Yes, the OTG data port (middle port) is being used. I assume that it's doing something, but Ubuntu doesn't like it for some reason?
from pwnagotchi.
By the way, I'll note that my network is 10.0.0.* 255.255.255.0 as well, maybe that is conflicting with the connection. Is there a way to force a specific IP on the device from the Micro SD directly? That may work.
from pwnagotchi.
By the way, I'll note that my network is 10.0.0.* 255.255.255.0 as well, maybe that is conflicting with the connection. Is there a way to force a specific IP on the device from the Micro SD directly? That may work.
Oh it might be interfering. See the original instructions here from evilsocket. I wonder if you're getting a conflict because your network matches the network pwnagotchi tries to set up locally.
from pwnagotchi.
I have run the linux connection script, however over time the connection drops automatically by whatever Ubuntu thinks is right, I believe being not connected to my local network may open up a window for SSH login; I think the first thing I'll try to do with it is change the default IP address on the device.. Finicky at best but now there is possibility of connecting. Will have to come back with updated progress
from pwnagotchi.
By the way, I'll note that my network is 10.0.0.* 255.255.255.0 as well, maybe that is conflicting with the connection. Is there a way to force a specific IP on the device from the Micro SD directly? That may work.
Oh it might be interfering. See the original instructions here from evilsocket. I wonder if you're getting a conflict because your network matches the network pwnagotchi tries to set up locally.
After messing around for a little while I came up with a working solution. This might be useful infos for other people having similar issues being on the same network config I have being 10.0.0.0/24 on my home network:
- Disconnect from default internet connection.
- Remove all pre-existing configurations if necessary.
- Use the Linux connect script (on Ubuntu host machine), In my case, it was:
#!/usr/bin/env bash
set -e
# name of the ethernet gadget interface on the host
USB_IFACE=${1:-enxfec40b5b3a66}
USB_IFACE_IP=10.0.0.1
USB_IFACE_NET=10.0.0.0/24
# host interface to use for upstream connection
UPSTREAM_IFACE=${2:-enp4s0}
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
echo "The process completed successfully. Made changes to ip and iptables."
- SSH into the device with 10.0.0.2 (or hostname.local).
- Reconfigure the usb0 connection expecting a disconnect (at /etc/network/interfaces.d/usb0-cfg )
allow-hotplug usb0
iface usb0 inet static
address 10.0.1.2
netmask 255.255.255.0
network 10.0.1.0
broadcast 10.0.1.255
gateway 10.0.1.1
metric 20
sudo ifconfig usb0 10.0.1.2 netmask 255.255.255.0
- (On Ubuntu host machine):
#!/usr/bin/env bash
set -e
# name of the ethernet gadget interface on the host
USB_IFACE=${1:-enxfec40b5b3a66}
USB_IFACE_IP=10.0.1.1
USB_IFACE_NET=10.0.1.0/24
# host interface to use for upstream connection
UPSTREAM_IFACE=${2:-enp4s0}
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
echo "The process completed successfully. Made changes to ip and iptables."
- Reconnect standard internet connection.
The device can now be pinged/connected while also simultaneously being connected to the internet.
from pwnagotchi.
I have resolved my connection issues please see the above for details 👍
from pwnagotchi.
Related Issues (20)
- [BUG] Pwnagotchi wont stay open HOT 2
- [BUG] Always in MANU Mode HOT 3
- [BUG] Auto Mode won't start, stuck at "starting monitor interface" HOT 6
- No default controller available HOT 9
- Support e-Ink Waveshare 2.13" model G (silver Sticker) HOT 1
- [BUG] ERROR:root:There was an error processing the configuration file: 'utf-8' codec can't decode byte 0xb0 in position 8390: invalid start byte HOT 1
- [BUG] default user `pi` and password `raspbery` not working? HOT 24
- [BUG] mastodon plugin doesn't post updates HOT 2
- [BUG] can't access bettercap's webui when the pwnagotchi is plugged in PC and it's in MANU mode HOT 3
- [BUG] RPI4 Network is down HOT 3
- is the UPS lite V1.2 supported? how much does it change from the 1.1? HOT 6
- SSH credentials (default.toml) HOT 6
- Support USB Wifi Dongles (Realtek) HOT 4
- does/will this project support the orange pi zero 2W? HOT 4
- [BUG] Cannot update to v1.8.5 HOT 3
- [BUG] Hitting `shutdown`, `reboot` or `restart in auto mode` gives me an error HOT 4
- [BUG] waiting for bettercap API to be available ... in 1.8.4 HOT 2
- [BUG]Handshakes-m Plugin isnt functioning properly
- [BUG] Typo in plugin upgrade
- Bought a recent RPIZ2W - Not Working [BUG]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pwnagotchi.