Ask Your Question
1

How can I configure UFW and Docker to enable the Tinyproxy container to receive all HTTP/HTTPS traffic?

asked 2022-03-20 11:00:00 +0000

devzero gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2021-06-03 18:00:00 +0000

nofretete gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-03-20 11:00:00 +0000

Seen: 16 times

Last updated: Jun 03 '21