update readme

This commit is contained in:
Cyberes 2023-06-20 13:56:59 -06:00
parent ab23d8419a
commit 2acc67b90a
Signed by: cyberes
GPG Key ID: 6B4A33836A9500FE
3 changed files with 42 additions and 16 deletions

View File

@ -1,32 +1,44 @@
# wlan2eth
_Transparently bridge your WiFi connection to your Ethernet interface._
This is a wireless to Ethernet router that bridges traffic from your wireless network to a wired client. The router creates a private LAN and clones the client's MAC address to its wired interface to get an IP from the DHCP server. All ports are forwarded to the client so traffic can flow in both directions.
_Transparently bridge your WiFi connection to your Ethernet interface._
This is about as transparent as you can get without using custom software, messy hacks, or a Wireless Distribution System (WDS).
There are three bridge versions:
## Install
- NAT in `bridge/nat/`
- The bridge creates a private LAN and clones the client's MAC address to its wired interface to get an IP from the DHCP server. All ports are forwarded to the client so traffic can flow in both directions. Supports only one bridged client.
- ARP proxy in `bridge/proxyarp/`
- Rewrites the MAC addresses of traffic passing through the bridge. Supports more than one bridged client.
This service was developed for Ubuntu but will likely work with other Linux versions as well.
- An experimental bridge written in Go in `go/`
- Similar to the ARP proxy. Mostly an experiment to learn how these things work. It has its own README file.
First, copy `config/config.sh.example` to `config/config.sh` and edit the file.
Then run `sudo ./bridge-install.sh` and everything will be set up the way it needs to be. This should be installed on a fresh machine. The install script is safe to run as many times as you need to.
## Install
The current folder will be copied to `/opt/wlan2eth` and chown-ed to `root`.
This service was developed for Ubuntu but will likely work with other Linux versions as well.
Once the install script has finished, reboot and you're good to go!
First, copy the config file:
## Use
- For the NAT bridge, copy `config/nat-config.sh.example` to `config/nat-config.sh`
- For the ARP proxy, copy `config/arp-config.sh.example` to `config/arp-config.sh`
To bridge your wired client to your WiFi network, simply plug it into the port you specified in `ETH_IFACE`. Wait a few seconds for the bridge to configure itself and once your client is given the IP `192.168.2.2`, you're good to go.
The bridge watches the status of the wired interface and when it is unplugged it will reset itself and wait for reconnection. It waits for its wireless interface to get an IP from DHCP before continuing so if you notice the bridge isn't giving your client an IP, check the bridge's WiFi connection.
The bridge device forwards all ports to your client, except the port specified in `ROUTER_SSH_PORT` (default is `64535`). This is the bridge's SSH server.
Edit the config and enter your information. The file is well-commented and has instructions on what to set the values to.
To access the bridge over SSH, do `ssh [username]@[IP] -P [ROUTER_SSH_PORT]`. You can use the command `sudo journalctl -b -f -u wlan2eth` to view the bridge logs.
## To Do
- [ ] forward multicast traffic from the WLAN?
Then, run the installer:
- For the NAT bridge, run `sudo ./bridge/nat/nat-install.sh`
- For the ARP proxy, run `sudo ./bridge/proxyarp/arp-install.sh`
Everything will be set up the way it needs to be. This should be installed on a fresh machine. The install script is safe to run as many times as you need to.
Once the install script has finished, reboot and you're good to go! The bridge service will automatically start at boot.
## Use
Refer to the `README.md` file in the individual bridge folders.

9
bridge/nat/README.md Normal file
View File

@ -0,0 +1,9 @@
## Use
To bridge your wired client to your WiFi network, simply plug it into the port you specified in `ETH_IFACE`. Wait a few seconds for the bridge to configure itself and once your client is given the IP `192.168.2.2`, you're good to go.
The bridge watches the status of the wired interface and when it is unplugged it will reset itself and wait for reconnection. It waits for its wireless interface to get an IP from DHCP before continuing so if you notice the bridge isn't giving your client an IP, check the bridge's WiFi connection.
The bridge device forwards all ports to your client, except the port specified in `ROUTER_SSH_PORT` (default is `64535`). This is the bridge's SSH server.
To access the bridge over SSH, do `ssh [username]@[IP] -P [ROUTER_SSH_PORT]`. You can use the command `sudo journalctl -b -f -u wlan2eth` to view the bridge logs.

View File

@ -0,0 +1,5 @@
## Use
This bridge is a lot simpler than the NAT version. Just plug your client(s) into the bridge and it should just work.
Make sure to use a hub (NOT a switch) if you have more than one bridged client. A switch doesn't let the bridge see all the traffic from the clients.