Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nginx on the port 80. #176

Open
sbbsworks opened this issue Nov 29, 2022 · 7 comments
Open

Nginx on the port 80. #176

sbbsworks opened this issue Nov 29, 2022 · 7 comments
Labels
checking check if the problem is reproducible

Comments

@sbbsworks
Copy link

Hi there, thanks for your job,

I am trying to make it work and the thing is I already have nginx on the port 80.

It doesn't start with the port 80.
If I try to change the port, say to 81, it starts but doesn't work.

Perhaps I missed something..

Please explain a way how to solve it.

@Husky110
Copy link

Husky110 commented Dec 5, 2022

Try running this:
docker run -it --rm --cap-add=NET_ADMIN \ -p 1194:1194/udp -p <WHATEVERPORTYOUWANNAHAVE>:8080/tcp \ -e HOST_ADDR=$(curl -s https://api.ipify.org) \ --name dockovpn alekslitvinenk/openvpn

@alekslitvinenk alekslitvinenk added the checking check if the problem is reproducible label Dec 7, 2022
@alekslitvinenk
Copy link
Collaborator

Hi, you can also use this snippet from README file to map ports used by container:

DOCKOVPN_CONFIG_PORT=<custom port>
DOCKOVPN_TUNNEL_PORT=<custom port>
docker run -it --rm --cap-add=NET_ADMIN \
-p $DOCKOVPN_TUNNEL_PORT:1194/udp -p $DOCKOVPN_CONFIG_PORT:8080/tcp \
-e HOST_ADDR=$(curl -s https://api.ipify.org) \
-e HOST_CONF_PORT="$DOCKOVPN_CONFIG_PORT" \
-e HOST_TUN_PORT="$DOCKOVPN_TUNNEL_PORT" \
--name dockovpn alekslitvinenk/openvpn

@sbbsworks
Copy link
Author

Hi, you can also use this snippet from README file to map ports used by container:

DOCKOVPN_CONFIG_PORT=<custom port>
DOCKOVPN_TUNNEL_PORT=<custom port>
docker run -it --rm --cap-add=NET_ADMIN \
-p $DOCKOVPN_TUNNEL_PORT:1194/udp -p $DOCKOVPN_CONFIG_PORT:8080/tcp \
-e HOST_ADDR=$(curl -s https://api.ipify.org) \
-e HOST_CONF_PORT="$DOCKOVPN_CONFIG_PORT" \
-e HOST_TUN_PORT="$DOCKOVPN_TUNNEL_PORT" \
--name dockovpn alekslitvinenk/openvpn

Hi there, yes, that was a useless one as everything is in the Readme..

@alekslitvinenk
Copy link
Collaborator

alekslitvinenk commented Dec 8, 2022 via email

@sbbsworks
Copy link
Author

noo))) it works fine, and your first reply is fine too.
everything works.

the ports have to be changed if there's a conflict.
how to do it is in the Readme.

the main issue was I didn't read the Readme before posting this.

@alekslitvinenk
Copy link
Collaborator

alekslitvinenk commented Dec 8, 2022 via email

@Husky110
Copy link

Husky110 commented Dec 8, 2022

Probably it has to do with the firewall enabled by default on your system. If you use Ubuntu, try disabling it by running: ufw disable

On Thu, 8 Dec 2022 at 08:37, sbbsworks @.> wrote: Hi, you can also use this snippet from README file to map ports used by container: DOCKOVPN_CONFIG_PORT= DOCKOVPN_TUNNEL_PORT= docker run -it --rm --cap-add=NET_ADMIN \ -p $DOCKOVPN_TUNNEL_PORT:1194/udp -p $DOCKOVPN_CONFIG_PORT:8080/tcp \ -e HOST_ADDR=$(curl -s https://api.ipify.org) \ -e HOST_CONF_PORT="$DOCKOVPN_CONFIG_PORT" \ -e HOST_TUN_PORT="$DOCKOVPN_TUNNEL_PORT" \ --name dockovpn alekslitvinenk/openvpn Hi there, yes, that was a useless one as everything is in the Readme.. — Reply to this email directly, view it on GitHub <#176 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABF3WXMUL2M7R4D4RHZRTQLWMF6ZLANCNFSM6AAAAAASOSY3UA . You are receiving this because you commented.Message ID: @.>

That is actually VERY ILL advice! It is possible to run docker in root-less-mode for a reason (beeing that containers have access to the docker-socket and can therefore break out getting full root-access on the host-machine). By running docker in root-lessmode (which requires a bit of setup) docker actually respects all the ufw rules. So it would be better to allow the configurated ports on the host-machine to be open, keeping the rest shut. (How do you think I got this running? ;) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
checking check if the problem is reproducible
Projects
None yet
Development

No branches or pull requests

3 participants