forwarder.py is a python3 program which will parse config.json, and forward traffic to a destination host
- Edit config.json
- Chmod 700 forwarder.py
- ./forwarder.py
#########
-
view_socket_state.sh - Takes proxy port number as argument. Displays number of ESTABLISHED and TIME_WAIT
-
http_loadtest.inline - Establishes several connections to port 80. Must be run inline
########
There was more success in load testing the server with multiprocessing compared to multithreading.
-
Setup and run ssh daemon on your computer.
- sudo apt update
- sudo apt install openssh-server
- sudo systemctl status ssh
- sudo ufw allow ssh
- ensure that there is a username and password that you are willing to enter into script. sudo adduser {username} sudo passwd {username} Default: Username is test, password is test NOTE: remember to disable after testing.
- install net-tools if needed to get ip address of computer
-
ensure python is setup on your computer
- sudo apt install python3
- python3 -m pip install --user --upgrade pip
- python3 -m pip --version shouldd be 3.0 or higher
- python3 -m pip install --user virtualenv
- python3 -m venv do this in the directory of the project
- exclude virtual environment directory in your .gitignore folder
- source /bin/activate to deactivate the virtual environment, run $ deactivate
- to install packages, run pip install pip install paramiko
-
edit loadtest.json with the ip address, port, username, password, number of connections and wait.
-
ssh into proxy with ssh @ to test
-
TO RUN: ./ssh_loadtester_process.py
-
To see socket states, run the following in proxy host: ./view_socket_state.sh <PROXYPORT#>