W
W
waltaki2021-05-21 17:56:52
linux
waltaki, 2021-05-21 17:56:52

How to forward GRE IP in Docker?

Hello.

I use 1 IP purchased from OVH to protect my project from light attacks. I forward it to the main machine using the GRE tunnel.
Everything works fine on the main machine, and it is possible to run applications on it.
But, when I run a docker container with this IP from GRE, nothing in the container itself works on it.
I read it, you may need to use GRE TAP to create a bridge on it, but have not checked it yet.
Interested in solving the issue with the GRE tunnel. Is it possible?

For example, running the following command with the main IP of the machine:

docker run --name some-nginx -p 168.119.1.1:8080:80 -d nginx # Работает
docker run --name some-nginx -p 135.125.250.1:8080:80 -d nginx # Не работает

and the site opens at 168.119.1.1:8080, but if I write the IP received from the GRE tunnel (135.125.250.1), then nothing works anymore.

UDP:
начало-туннеля# curl 135.125.250.1:8080 # Работает
конец-туннеля# curl 135.125.250.1:8080 # Работает
через-интернет# curl 135.125.250.1:8080 # Не работает

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question