From 70ad9fba020b805f898254674b64aa60c7d3aa8b Mon Sep 17 00:00:00 2001 From: David Kebler Date: Thu, 7 May 2020 08:38:45 -0700 Subject: [PATCH] add readme --- install.sh | 0 readme.md | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) delete mode 100755 install.sh create mode 100644 readme.md diff --git a/install.sh b/install.sh deleted file mode 100755 index e69de29..0000000 diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..e7cf321 --- /dev/null +++ b/readme.md @@ -0,0 +1,33 @@ +# Simple Masquerade of Machines on Network through a WAN Interface + +Need a simple (no firewall) isolated network within your network where those machines need to "talk outside". + +My use case is a stand alone IOT system that had more than one host machine. By isolating that with a "gateway" sbc with dual nic (used usb/ethernet) I can have consistent IP addressing no matter where the system is deployed. + +This really is only appropriate within a private LAN. If the WAN side is going to be public facing then you need a more robust firewall like firehol. + +Included in repo are three bash scripts and Systemd Service file. + +1. clone repo + +2. edit the scripts changing the wan/lan Nic names + +3. edit service file changing the path to scripts + +4. link or copy the service file to `/etc/systemd/system` + + +Then to start, stop, persist + +``` +sudo systemctl start masquerade +sudo systemctl stop masquerade +sudo systemctl enable masquerade +``` + +try starting the service then ping something "outside" from a host "inside" (not the gateway) + +if it works then enable it and you are set. + +inspired by this post +https://superuser.com/a/939657/430020 \ No newline at end of file