Portfolio of an Engineer of all trades
To access the repo having to do with this project click here.
Verify the ability of LiFi to create private internet access points (APs) for more secure internet access.
For the network setup, there were a lot of barriers due to the complexity of the enterprise network and my own lack of experience with network configuration outside of RADIUS server setup on my own router for testing purposes of the WPA3 Enterprise capabilities of the APs provided. The following approaches were tried before landing on the steps below:
Due to the firewalls on both devices, the first two approaches were unsuccessful. The third approach was discarded after communication with the network engineers, as a VLAN is simpler to configure and removes the need for a new router, similar to using a network switch.
When it came to the web-page setup the setup of the web-page was extremely straight forward. The only thing that changed throughout the project is the manner in which the page was hosted. The following approaches were evaluated and attempted, before finally configuring the HTML page to be built through Flask, and then broadcasted on the network using Gunicorn the WSGI (web server gateway interface) provider.
This proved to be difficult and more complex then necessary. It was over engineering the solution, and added a layer of complexity with Docker’s own network interface. Thus, the following steps were completed for the web-page setup and hosting.
from flask import Flask, render_template #make externally available by adding --host=0.0.0.0
app = Flask(__name__)
@app.route("/")
def home():
return render_template('index.html')
if __name__ == '__main__':
app.run(host='0.0.0.0')
. .venv/bin/activate
pip install Flask
export FLASK_APP = lifi_flask.py
flask run --host-0.0.0.0 --port=8000
scp /path/to/local/file <username>@<pi>.local:/home/<username>
sudo apt-get install gunicorn
gunicorn -w 4 -b 0.0.0.0:8000 lifi_flask:app