Giter VIP home page Giter VIP logo

Comments (21)

chenks avatar chenks commented on July 20, 2024 1

just an FYI, adding the DNS option did indeed make it work. it now resolves FQDN correctly.

sudo docker run -it --cap-add=NET_ADMIN --device /dev/net/tun --dns=8.8.8.8 --name surfshark -e SURFSHARK_USER=************** -e SURFSHARK_COUNTRY=nl -e SURFSHARK_PASSWORD=************** ilteoood/docker-surfshark

from docker-surfshark.

ilteoood avatar ilteoood commented on July 20, 2024

Hi,
did you tried to connect to it another container?
Did you tried with the --dns option?

from docker-surfshark.

chenks avatar chenks commented on July 20, 2024

no i haven't connected it to another container yet, i was wanting to ensure that it was actually connected and working first before i did that.

at the moment it appears that the vpn container has no internet access.

from docker-surfshark.

ilteoood avatar ilteoood commented on July 20, 2024

Did you tried with the --dns option?

from docker-surfshark.

chenks avatar chenks commented on July 20, 2024

dns option on what container? the VPN container or the container i want to use it with?
the documentation is a little vague in regards to DNS option.

also, i would be wanting to use the VPN connection with a container that already exists and is up and running? from what i can see the command appears to want to create a new container to use it with.

from docker-surfshark.

ilteoood avatar ilteoood commented on July 20, 2024

The DNS option is not listed in documentation because you shouldn't need it, I'm trying to help you with some advice.
You could try to use the dns option in the vpn cointainer, but without any detailed log of the vpn container is hard to figure out the problem.

For the running cointaner, you could use the docker CLI to specify the network that should be attached to your running container, btw I suggest you to re-create it (containers should always be re-creatable)

from docker-surfshark.

chenks avatar chenks commented on July 20, 2024

i have attached the log if that helps.
all the help is appreciated.

log.zip

from docker-surfshark.

ilteoood avatar ilteoood commented on July 20, 2024

Can you extract them with the docker CLI?
There aren't sufficient.

from docker-surfshark.

chenks avatar chenks commented on July 20, 2024

what specifically do you need to see? as that is the log file that docker gave me for that container.
this is docker on a synology NAS.

running sudo docker logs <container_name> gives the same result as the CSV file i posted

from docker-surfshark.

ilteoood avatar ilteoood commented on July 20, 2024

Ok, can you try to:

  • delete this container
  • set a country in the environment variable (it, for example)
  • recreate the container
  • attach new logs

from docker-surfshark.

ilteoood avatar ilteoood commented on July 20, 2024

@chenks
I've removed your comment, because in the history everyone can see your credentials.
The error "docker: invalid reference format: repository name must be lowercase." appear because you missed the "-e" parameter between SURFSHARK_COUNTRY and SURFSHAR_USER.

Please, retry with the correct syntax.

from docker-surfshark.

chenks avatar chenks commented on July 20, 2024

OK i have re-created with the country set, and still same error

/vpn # curl ifconfig.me                                                                                                   
curl: (6) Could not resolve host: ifconfig.me

from docker-surfshark.

ilteoood avatar ilteoood commented on July 20, 2024

OK, just a few question: which is your os? Are you sure that you have the /dev/net/tun device?

I've retried everything, but without any error
image

image

from docker-surfshark.

chenks avatar chenks commented on July 20, 2024

it's a Synology NAS, so it's a very heavily customized Debian fork that uses Upstart (vs. sysvinit or systemd).
how would i check if i have the /dev/net/tun device?

this is my log showing the same as yours

Wed Jul 15 12:25:49 2020 TUN/TAP device tun0 opened
Wed Jul 15 12:25:49 2020 TUN/TAP TX queue length set to 100
Wed Jul 15 12:25:49 2020 /sbin/ip link set dev tun0 up mtu 1500
Wed Jul 15 12:25:49 2020 /sbin/ip addr add dev tun0 10.7.7.10/24 broadcast 10.7.7.255
Wed Jul 15 12:25:49 2020 /sbin/ip route add 212.102.54.177/32 via 172.17.0.1
Wed Jul 15 12:25:49 2020 /sbin/ip route add 0.0.0.0/1 via 10.7.7.1
Wed Jul 15 12:25:49 2020 /sbin/ip route add 128.0.0.0/1 via 10.7.7.1
Wed Jul 15 12:25:49 2020 Initialization Sequence Completed

from docker-surfshark.

ilteoood avatar ilteoood commented on July 20, 2024

from docker-surfshark.

chenks avatar chenks commented on July 20, 2024

within /dev/net i have a file called "tun".

Annotation 2020-07-16 114905

from docker-surfshark.

ilteoood avatar ilteoood commented on July 20, 2024

This is not an issue related to the image, but related to your system.
Please, consider to predispose your system for the OpenVPN container, as described here: https://www.reddit.com/r/synology/comments/74te0y/howto_deploy_openvpn_on_synology_using_docker/

from docker-surfshark.

chenks avatar chenks commented on July 20, 2024

so it's not a DNS issue then?
the link you posted appears to be about deploying an OpenVPN server?

from docker-surfshark.

ilteoood avatar ilteoood commented on July 20, 2024

Nope. The container is initially connected to the VPN (as you can see with the message Wed Jul 15 12:25:49 2020 Initialization Sequence Completed), but after the connection can't reach internet because the dedicated device (tun) isn't properly configured.

from docker-surfshark.

chenks avatar chenks commented on July 20, 2024

having looked into this further, i believe the tun is configured correctly, as the VPN container has interent access if you use just IP addresses, it only doesn't work when usign FQDN, therefore it appears to be a DNS issues.

can you provide an example of creating the container with DNS option?

from docker-surfshark.

ilteoood avatar ilteoood commented on July 20, 2024

Just add --dns option on container creation, as documented here:
https://docs.docker.com/config/containers/container-networking/#dns-services

from docker-surfshark.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.