Spaces:
Build error
Build error
Commit
·
4cda71a
1
Parent(s):
e0ec86c
Fixed a few errors in documentation
Browse files- PortiloopV2.md +7 -5
PortiloopV2.md
CHANGED
|
@@ -21,7 +21,7 @@ These first steps will help you set up an SSH connection to the device.
|
|
| 21 |
|
| 22 |
## Dependencies
|
| 23 |
|
| 24 |
-
To install all dependencies,
|
| 25 |
|
| 26 |
## Setting up the Access Point
|
| 27 |
|
|
@@ -42,7 +42,7 @@ Next, you will need to set up a systemd service to configure and enable the `ap0
|
|
| 42 |
First, we can create a script to create the interface using `sudo nano /usr/local/bin/create_ap0.sh`. The script should contain the following content:
|
| 43 |
|
| 44 |
```bash
|
| 45 |
-
|
| 46 |
|
| 47 |
# Delete the existing p2p0 interface
|
| 48 |
sudo iw dev p2p0 del
|
|
@@ -63,7 +63,9 @@ sudo systemctl restart NetworkManager
|
|
| 63 |
sudo ifconfig ap0 192.168.4.1 up
|
| 64 |
```
|
| 65 |
|
| 66 |
-
To
|
|
|
|
|
|
|
| 67 |
|
| 68 |
```ini
|
| 69 |
[keyfile]
|
|
@@ -91,7 +93,7 @@ This service file specifies that it should run the `create_ap0.sh` script once o
|
|
| 91 |
|
| 92 |
Hostapd is the software that will create the wireless access point. First, you will need to open the in `/etc/sysctl.conf` file and change the line for ip_forwarding to `net.ipv4.ip_forward=1`.
|
| 93 |
|
| 94 |
-
Next, you will
|
| 95 |
|
| 96 |
```ini
|
| 97 |
interface=ap0
|
|
@@ -120,7 +122,7 @@ Dnsmasq is the software that will provide DHCP and DNS services for the access p
|
|
| 120 |
# Configuration for Access Point
|
| 121 |
interface=ap0
|
| 122 |
dhcp-range=192.168.4.2,192.168.4.20,255.255.255.0,24h
|
| 123 |
-
dhcp-option=3,192.168.4.
|
| 124 |
dhcp-option=6,192.168.4.1
|
| 125 |
server=8.8.8.8
|
| 126 |
```
|
|
|
|
| 21 |
|
| 22 |
## Dependencies
|
| 23 |
|
| 24 |
+
To install all dependencies, run the installation.sh script. This script takes care of all the installations for you so it may take a while (~25 minutes).
|
| 25 |
|
| 26 |
## Setting up the Access Point
|
| 27 |
|
|
|
|
| 42 |
First, we can create a script to create the interface using `sudo nano /usr/local/bin/create_ap0.sh`. The script should contain the following content:
|
| 43 |
|
| 44 |
```bash
|
| 45 |
+
#!/bin/bash
|
| 46 |
|
| 47 |
# Delete the existing p2p0 interface
|
| 48 |
sudo iw dev p2p0 del
|
|
|
|
| 63 |
sudo ifconfig ap0 192.168.4.1 up
|
| 64 |
```
|
| 65 |
|
| 66 |
+
To be able to run this file like a script, run `sudo chmod +x /usr/local/bin/create_ap0.sh`
|
| 67 |
+
|
| 68 |
+
To avoid configuration issues, we need to tell NetworkManager to ignore this interface. First, run `nmcli device set ap0 managed no`. Then, create a file called `/etc/NetworkManager/conf.d/unmanaged.conf`. In this file, write the following:
|
| 69 |
|
| 70 |
```ini
|
| 71 |
[keyfile]
|
|
|
|
| 93 |
|
| 94 |
Hostapd is the software that will create the wireless access point. First, you will need to open the in `/etc/sysctl.conf` file and change the line for ip_forwarding to `net.ipv4.ip_forward=1`.
|
| 95 |
|
| 96 |
+
Next, you will create a configuration file at `/etc/hostapd/hostapd.conf` with the following content:
|
| 97 |
|
| 98 |
```ini
|
| 99 |
interface=ap0
|
|
|
|
| 122 |
# Configuration for Access Point
|
| 123 |
interface=ap0
|
| 124 |
dhcp-range=192.168.4.2,192.168.4.20,255.255.255.0,24h
|
| 125 |
+
dhcp-option=3,192.168.4.1
|
| 126 |
dhcp-option=6,192.168.4.1
|
| 127 |
server=8.8.8.8
|
| 128 |
```
|