Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To configure UFW and Docker to enable the Tinyproxy container to receive all HTTP/HTTPS traffic, follow the steps below:

Step 1: Install Docker and UFW

If you don't have Docker and UFW installed, run the following commands:

sudo apt-get update
sudo apt-get install docker.io ufw

Step 2: Allow Docker through UFW

Allow Docker to communicate through UFW by running the following command:

sudo ufw allow in on docker0

Step 3: Configure Docker to use the host network

To allow the Tinyproxy container to receive all HTTP/HTTPS traffic, you need to configure Docker to use the host network. To do this, add the following line to the Docker run command:

--net=host

For example, to run a Tinyproxy container using the host network, run the following command:

sudo docker run -d --name tinyproxy --net=host dannydirect/tinyproxy

Step 4: Allow HTTP/HTTPS traffic through UFW

Allow HTTP traffic through UFW by running the following command:

sudo ufw allow http

Allow HTTPS traffic through UFW by running the following command:

sudo ufw allow https

Step 5: Verify the configuration

To verify that the Tinyproxy container is receiving all HTTP/HTTPS traffic, open a web browser and enter the IP address of your machine followed by the port number of the Tinyproxy container (by default, port 8888).

For example, if your machine's IP address is 192.168.1.100, enter the following URL in your web browser:

http://192.168.1.100:8888

You should now be able to browse the web through the Tinyproxy container.