Add sysctl port forwarding instructions

pull/414/head
wildcapuchino 2024-09-27 22:36:29 -03:00
parent 050df9c7de
commit 2f5bdd0219
No known key found for this signature in database
GPG Key ID: 6605EB44E2888D5F
1 changed files with 14 additions and 0 deletions

View File

@ -71,6 +71,20 @@ sudo iptables --table nat -A POSTROUTING -o $INTERNET_IF -j MASQUERADE
``` ```
This script will receive as input `$1` the AIO ethernet interface, and forward the traffic to `$2`. This script will receive as input `$1` the AIO ethernet interface, and forward the traffic to `$2`.
Enable IP forwading by editing `/etc/sysctl.conf` on your local PC and adding:
```
net.ipv4.ip_forward = 1
```
And enable the changes with:
```bash
sudo sysctl -p /etc/sysctl.conf
```
on Debian/Ubuntu systems this can be also done restarting the procps service:
```
sudo /etc/init.d/procps restart
```
9. Run the script on your local PC: 9. Run the script on your local PC:
```bash ```bash
chmod u+x ./forward.sh chmod u+x ./forward.sh