akhepcat / bridgeap Goto Github PK
View Code? Open in Web Editor NEWAutomagically bridge any live interface to any idle interface using NATS, DHCP, and HostAP where applicable
Automagically bridge any live interface to any idle interface using NATS, DHCP, and HostAP where applicable
instead of erroring out when there are no "outside" interfaces available,
burn some CPU cycles by waiting for something to come live.
simple option in the config file to enable/disable that.
useful for /etc/init.d -style startup scripting.
I'm not sure if I need to start my openvpn connection first or not. So I tried both ways, starting before i start bridgeap and after - each with a restart in between. This appears to look ok starting openvpn connection before but internet is not working for client connecting to the wifi interface over the spawned wifi name. Eth0 is the interface to regular internet. The client does get an address of 100.64.43.5 but no internet :(. I've tried manually setting dns settings on my test client device to 8.8.8.8 to see if it was dns issues. but it isn't.
pi@raspberrypi:~ $ sudo bridgeap start
Starting bridgeap interface bridging
Configuration file: /usr/local/src/bridgeap/hostapd.conf-bridgeap
Failed to create interface mon.wlan0: -95 (Operation not supported)
wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Internet Systems Consortium DHCP Server 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Config file: /usr/local/src/bridgeap/dhcpd.conf-bridgeap
Database file: /var/lib/dhcp/dhcpd.leases-bridgeap
PID file: /run/dhcpd-bridgeap.pid
Wrote 0 deleted host decls to leases file.
Wrote 0 new dynamic host decls to leases file.
Wrote 1 leases to leases file.
Listening on LPF/wlan0/b8:27:eb:28:1b:70/100.64.43.0/24
Sending on LPF/wlan0/b8:27:eb:28:1b:70/100.64.43.0/24
Sending on Socket/fallback/fallback-net
pi@raspberrypi:~ $ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.140 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 prefixlen 64 scopeid 0x20
inet6 prefixlen 64 scopeid 0x0
ether b8:27:eb:7d:4e:25 txqueuelen 1000 (Ethernet)
RX packets 408 bytes 47876 (46.7 KiB)
RX errors 0 dropped 4 overruns 0 frame 0
TX packets 269 bytes 46128 (45.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Local Loopback)
RX packets 6 bytes 234 (234.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 6 bytes 234 (234.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet netmask 255.255.255.192 destination 192.121.245.97
inet6 fe80::9f1b:ea0a:9dd:4d54 prefixlen 64 scopeid 0x20
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 100 (UNSPEC)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 3 bytes 144 (144.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 100.64.43.1 netmask 255.255.255.0 broadcast 100.64.43.255
inet6 fe80::e44e:6c7d:8629:21f4 prefixlen 64 scopeid 0x20
ether b8:27:eb:28:1b:70 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 46 bytes 8426 (8.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
My prcess:
I am using the latest raspbian stretch image available to flash my sd card for Pi 3b+. Then I install these things:
sudo apt install expect vim openvpn git iproute2 isc-dhcp-server net-tools iptables hostapd wireless-tools radvd. Using expect for my openvpn connetion setup.
sudo su -
cd /usr/local/src
git clone https://github.com/akhepcat/bridgeap.git
mkdir /etc/bridgeap
cp bridgeap/conf /etc/bridgeap
ln -s /usr/local/src/bridgeap/bridgeap /usr/local/sbin/
ln -s /usr/local/src/bridgeap /etc/init.d/
update-rc.d bridgeap defaults
Edit this file to change ignore mode to equal 1 and update wifi pass and ID:
/etc/bridgeap/bridgeap.conf
Then I run my openvpn connection which is using a UDP TUN connection over port 1194. This connects successfully.
Then I run the "bridgeap start" command and get the output above.
This is my route table with redacted openvpn IPs:
pi@raspberrypi:~ $ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 openvpnIP 128.0.0.0 UG 0 0 0 tun0
0.0.0.0 192.168.1.1 0.0.0.0 UG 202 0 0 eth0
100.64.43.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
128.0.0.0 openvpnIP 128.0.0.0 UG 0 0 0 tun0
169.254.0.0 0.0.0.0 255.255.0.0 U 303 0 0 wlan0
openvpnServerIP 192.168.1.1 255.255.255.255 UGH 0 0 0 eth0
openvpnIP 0.0.0.0 255.255.255.192 U 0 0 0 tun0
192.168.1.0 0.0.0.0 255.255.255.0 U 202 0 0 eth0
Thanks so much for replying to the last ticket. I really would like to get this working! If this works I'm going to make like 5 of these things!! haha.
I followed the wiki commands given:
sudo su -
root@raspberrypi:/usr/local/src# sudo /usr/local/sbin/bridgeap start
Starting bridgeap interface bridging
Error for wireless request "Set Mode" (8B06) :
SET failed on device wlan0 ; Invalid argument.
failed to set Master mode
ps- i've spent probably way way too long trying to get a vpn client connection serving to the wifi from eth0 from my raspberry pi 3b+. I was hoping this would actually going to solve my issues and end the hunt.
I have a wired connection that I am trying to share via wifi on a Raspberry Pi 3, running latest Raspbian. Following the installation instructions in the wiki:
update-rc.d bridgeap defaults gives the error: update-rc.d: error: initscript does not exist: /etc/init.d/bridgeap
ignoring that and continuing, sudo /usr/local/sbin/bridgeap start gives:
Starting bridgeap interface bridging
Error for wireless request "Set Mode" (8B06) :
SET failed on device wlan0 ; Invalid argument.
failed to set Master mode
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.