Homebrew RELEASE yaDNS-NX - Yet another DNS for connect your Switch to your WiFi without internet - In a docker

MichiS97

"Leftist snowflake milennial"
Member
Joined
Jun 14, 2011
Messages
1,817
Trophies
2
Age
26
Location
Munich
XP
3,620
Country
Germany
What's the best way to make the container restart automatically when I reboot my PC?
I've just recently moved to Linux and I'm still a little bit of a noob.
 

PsychoRabbit

Well-Known Member
OP
Newcomer
Joined
Nov 25, 2016
Messages
50
Trophies
0
Age
33
XP
390
Country
Argentina
What's the best way to make the container restart automatically when I reboot my PC?
I've just recently moved to Linux and I'm still a little bit of a noob.
I did no testing but if you add the parameter --restart=always on the first docker run it should.
If the container is already running or created the command is
docker update --restart=always <container>
Let me know if this work, I will test it later today.
 

MichiS97

"Leftist snowflake milennial"
Member
Joined
Jun 14, 2011
Messages
1,817
Trophies
2
Age
26
Location
Munich
XP
3,620
Country
Germany
I did no testing but if you add the parameter --restart=always on the first docker run it should.
If the container is already running or created the command is
docker update --restart=always <container>
Let me know if this work, I will test it later today.
Doesn't seem to work :/
 

PsychoRabbit

Well-Known Member
OP
Newcomer
Joined
Nov 25, 2016
Messages
50
Trophies
0
Age
33
XP
390
Country
Argentina
Try without the = sign. (docker --restart always yadns-nx) And you might have to reboot once after that.
Yep, just tested, without the = sign. Thanks.
I gonna update the first post.
So, if it's the first time running the docker
docker run --name yadns-nx -d -p 80:80 -p 53:53 -p 53:53/udp --restart always luiscassih/yadns-nx 192.168.1.27
If there's a container already running.
docker update --restart always yadns-nx (or the container id)

You can verify doing a docker inspect yadns-nx and looking for
"RestartPolicy": {
"Name": "always",
"MaximumRetryCount": 0
}


After that, the docker will start within the service on the system startup.
 
  • Like
Reactions: MichiS97

MichiS97

"Leftist snowflake milennial"
Member
Joined
Jun 14, 2011
Messages
1,817
Trophies
2
Age
26
Location
Munich
XP
3,620
Country
Germany
Yep, just tested, without the = sign. Thanks.
I gonna update the first post.
So, if it's the first time running the docker
docker run --name yadns-nx -d -p 80:80 -p 53:53 -p 53:53/udp --restart always luiscassih/yadns-nx 192.168.1.27
If there's a container already running.
docker update --restart always yadns-nx (or the container id)

You can verify doing a docker inspect yadns-nx and looking for
"RestartPolicy": {
"Name": "always",
"MaximumRetryCount": 0
}


After that, the docker will start within the service on the system startup.
For some reason, it's still not working for me, but the logs are really strange.
When I run docker inspect yadns-nx after a reboot, it suggests that the container is still running. However, I still get a name resolution error anytime I try to open a website. When I run "docker start yadns-nx" again, it works.
The logs from the inspect command don't change after I execute the start command though.

Here are the two logs:
[
{
"Id": "9f9455600df31d7d41fb1b9edb9f4048a9e21d59d4adde23ba89b86442eca3e9",
"Created": "2018-09-04T07:29:35.883814501Z",
"Path": "docker-entrypoint.sh",
"Args": [
"192.168.178.112",
"--restart",
"always"
],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 3783,
"ExitCode": 0,
"Error": "",
"StartedAt": "2018-09-04T19:47:32.895835031Z",
"FinishedAt": "2018-09-04T14:28:45.530432625Z"
},
"Image": "sha256:ecadd2a7606cd5aee1f7784ebe33d16e33fdfef895377b2791bb379e47fb3c06",
"ResolvConfPath": "/var/lib/docker/containers/9f9455600df31d7d41fb1b9edb9f4048a9e21d59d4adde23ba89b86442eca3e9/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/9f9455600df31d7d41fb1b9edb9f4048a9e21d59d4adde23ba89b86442eca3e9/hostname",
"HostsPath": "/var/lib/docker/containers/9f9455600df31d7d41fb1b9edb9f4048a9e21d59d4adde23ba89b86442eca3e9/hosts",
"LogPath": "/var/lib/docker/containers/9f9455600df31d7d41fb1b9edb9f4048a9e21d59d4adde23ba89b86442eca3e9/9f9455600df31d7d41fb1b9edb9f4048a9e21d59d4adde23ba89b86442eca3e9-json.log",
"Name": "/yadns-nx",
"RestartCount": 0,
"Driver": "overlay2",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "docker-default",
"ExecIDs": null,
"HostConfig": {
"Binds": null,
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "default",
"PortBindings": {
"53/udp": [
{
"HostIp": "",
"HostPort": "53"
}
],
"80/tcp": [
{
"HostIp": "",
"HostPort": "80"
}
]
},
"RestartPolicy": {
"Name": "always",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": null,
"CapAdd": null,
"CapDrop": null,
"Dns": [],
"DnsOptions": [],
"DnsSearch": [],
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "shareable",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "runc",
"ConsoleSize": [
0,
0
],
"Isolation": "",
"CpuShares": 0,
"Memory": 0,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": [],
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": [],
"DeviceCgroupRules": null,
"DiskQuota": 0,
"KernelMemory": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": null,
"OomKillDisable": false,
"PidsLimit": 0,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0
},
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/45706d1b2471eb0e1fb9c83f49eac65e18c9a4d40c6ab59e1803204c7ff25547-init/diff:/var/lib/docker/overlay2/cbedd8aa083911ef871884c5d6ee56923bc3f7ac060bfc660009bb045a67c8da/diff:/var/lib/docker/overlay2/83bfae6e4fad3814c300c2990d3d7b6142d17dc237b7a61708493a3ee11144eb/diff:/var/lib/docker/overlay2/0c990078cfcc44b2b697618e397654816c4e536415e6dc5fca9e29f3ea2addd5/diff:/var/lib/docker/overlay2/9f5b8f1d4a1a30e956e2d75f7b5c1607d127e0550ba8cc25d6dc27748404b49b/diff:/var/lib/docker/overlay2/b6a7bb88d71033dbd4bf625068e2225bc54957ccee5c94b73809206ab24758f9/diff:/var/lib/docker/overlay2/efcb6cb0f12157782fc549b9c627760a6475f905cdc3440f753e121f4bd747c7/diff:/var/lib/docker/overlay2/628962f7ac772ea8881816984c2c99e6e695fb033158e1d533e17a0b7653635d/diff:/var/lib/docker/overlay2/31c1e10d4873df286dba5b7bcaca176e6b86cf4b88899523f1bd1196def1d3f5/diff:/var/lib/docker/overlay2/bf4b1f1e1fb8f8b92af1f10804b0f6e0b28f4dfa88067218b5a335b1f469a057/diff:/var/lib/docker/overlay2/8c7ebb078120d7dea0b3ad0363ddd0e438f02332fa27b3c67a8e6e963bf11383/diff",
"MergedDir": "/var/lib/docker/overlay2/45706d1b2471eb0e1fb9c83f49eac65e18c9a4d40c6ab59e1803204c7ff25547/merged",
"UpperDir": "/var/lib/docker/overlay2/45706d1b2471eb0e1fb9c83f49eac65e18c9a4d40c6ab59e1803204c7ff25547/diff",
"WorkDir": "/var/lib/docker/overlay2/45706d1b2471eb0e1fb9c83f49eac65e18c9a4d40c6ab59e1803204c7ff25547/work"
},
"Name": "overlay2"
},
"Mounts": [],
"Config": {
"Hostname": "9f9455600df3",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"53/tcp": {},
"53/udp": {},
"80/tcp": {},
"80/udp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"NGINX_VERSION=1.15.2-1~stretch",
"NJS_VERSION=1.15.2.0.2.2-1~stretch"
],
"Cmd": [
"192.168.178.112",
"--restart",
"always"
],
"Image": "luiscassih/yadns-nx",
"Volumes": null,
"WorkingDir": "",
"Entrypoint": [
"docker-entrypoint.sh"
],
"OnBuild": null,
"Labels": {
"maintainer": "NGINX Docker Maintainers <[email protected]>"
},
"StopSignal": "SIGTERM"
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "a1277b4e35448f2ae04b2609d4e778338c2fc7ecfbd8b1be073e15639c61657c",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"53/tcp": null,
"53/udp": [
{
"HostIp": "0.0.0.0",
"HostPort": "53"
}
],
"80/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "80"
}
],
"80/udp": null
},
"SandboxKey": "/var/run/docker/netns/a1277b4e3544",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "0b00a528bd072950e4028de991fa9c43809baddd9fd3f88e1e5a6ca83293b59a",
"Gateway": "172.17.0.1",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"MacAddress": "02:42:ac:11:00:02",
"Networks": {
"bridge": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"NetworkID": "6144c5a12d84164c03ab348072fe9e09aab41b68f4102a3b13ecf1266b1caf74",
"EndpointID": "0b00a528bd072950e4028de991fa9c43809baddd9fd3f88e1e5a6ca83293b59a",
"Gateway": "172.17.0.1",
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:11:00:02",
"DriverOpts": null
}
}
}
}
]

[
{
"Id": "9f9455600df31d7d41fb1b9edb9f4048a9e21d59d4adde23ba89b86442eca3e9",
"Created": "2018-09-04T07:29:35.883814501Z",
"Path": "docker-entrypoint.sh",
"Args": [
"192.168.178.112",
"--restart",
"always"
],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 3783,
"ExitCode": 0,
"Error": "",
"StartedAt": "2018-09-04T19:47:32.895835031Z",
"FinishedAt": "2018-09-04T14:28:45.530432625Z"
},
"Image": "sha256:ecadd2a7606cd5aee1f7784ebe33d16e33fdfef895377b2791bb379e47fb3c06",
"ResolvConfPath": "/var/lib/docker/containers/9f9455600df31d7d41fb1b9edb9f4048a9e21d59d4adde23ba89b86442eca3e9/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/9f9455600df31d7d41fb1b9edb9f4048a9e21d59d4adde23ba89b86442eca3e9/hostname",
"HostsPath": "/var/lib/docker/containers/9f9455600df31d7d41fb1b9edb9f4048a9e21d59d4adde23ba89b86442eca3e9/hosts",
"LogPath": "/var/lib/docker/containers/9f9455600df31d7d41fb1b9edb9f4048a9e21d59d4adde23ba89b86442eca3e9/9f9455600df31d7d41fb1b9edb9f4048a9e21d59d4adde23ba89b86442eca3e9-json.log",
"Name": "/yadns-nx",
"RestartCount": 0,
"Driver": "overlay2",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "docker-default",
"ExecIDs": null,
"HostConfig": {
"Binds": null,
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "default",
"PortBindings": {
"53/udp": [
{
"HostIp": "",
"HostPort": "53"
}
],
"80/tcp": [
{
"HostIp": "",
"HostPort": "80"
}
]
},
"RestartPolicy": {
"Name": "always",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": null,
"CapAdd": null,
"CapDrop": null,
"Dns": [],
"DnsOptions": [],
"DnsSearch": [],
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "shareable",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "runc",
"ConsoleSize": [
0,
0
],
"Isolation": "",
"CpuShares": 0,
"Memory": 0,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": [],
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": [],
"DeviceCgroupRules": null,
"DiskQuota": 0,
"KernelMemory": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": null,
"OomKillDisable": false,
"PidsLimit": 0,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0
},
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/45706d1b2471eb0e1fb9c83f49eac65e18c9a4d40c6ab59e1803204c7ff25547-init/diff:/var/lib/docker/overlay2/cbedd8aa083911ef871884c5d6ee56923bc3f7ac060bfc660009bb045a67c8da/diff:/var/lib/docker/overlay2/83bfae6e4fad3814c300c2990d3d7b6142d17dc237b7a61708493a3ee11144eb/diff:/var/lib/docker/overlay2/0c990078cfcc44b2b697618e397654816c4e536415e6dc5fca9e29f3ea2addd5/diff:/var/lib/docker/overlay2/9f5b8f1d4a1a30e956e2d75f7b5c1607d127e0550ba8cc25d6dc27748404b49b/diff:/var/lib/docker/overlay2/b6a7bb88d71033dbd4bf625068e2225bc54957ccee5c94b73809206ab24758f9/diff:/var/lib/docker/overlay2/efcb6cb0f12157782fc549b9c627760a6475f905cdc3440f753e121f4bd747c7/diff:/var/lib/docker/overlay2/628962f7ac772ea8881816984c2c99e6e695fb033158e1d533e17a0b7653635d/diff:/var/lib/docker/overlay2/31c1e10d4873df286dba5b7bcaca176e6b86cf4b88899523f1bd1196def1d3f5/diff:/var/lib/docker/overlay2/bf4b1f1e1fb8f8b92af1f10804b0f6e0b28f4dfa88067218b5a335b1f469a057/diff:/var/lib/docker/overlay2/8c7ebb078120d7dea0b3ad0363ddd0e438f02332fa27b3c67a8e6e963bf11383/diff",
"MergedDir": "/var/lib/docker/overlay2/45706d1b2471eb0e1fb9c83f49eac65e18c9a4d40c6ab59e1803204c7ff25547/merged",
"UpperDir": "/var/lib/docker/overlay2/45706d1b2471eb0e1fb9c83f49eac65e18c9a4d40c6ab59e1803204c7ff25547/diff",
"WorkDir": "/var/lib/docker/overlay2/45706d1b2471eb0e1fb9c83f49eac65e18c9a4d40c6ab59e1803204c7ff25547/work"
},
"Name": "overlay2"
},
"Mounts": [],
"Config": {
"Hostname": "9f9455600df3",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"53/tcp": {},
"53/udp": {},
"80/tcp": {},
"80/udp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"NGINX_VERSION=1.15.2-1~stretch",
"NJS_VERSION=1.15.2.0.2.2-1~stretch"
],
"Cmd": [
"192.168.178.112",
"--restart",
"always"
],
"Image": "luiscassih/yadns-nx",
"Volumes": null,
"WorkingDir": "",
"Entrypoint": [
"docker-entrypoint.sh"
],
"OnBuild": null,
"Labels": {
"maintainer": "NGINX Docker Maintainers <[email protected]>"
},
"StopSignal": "SIGTERM"
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "a1277b4e35448f2ae04b2609d4e778338c2fc7ecfbd8b1be073e15639c61657c",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"53/tcp": null,
"53/udp": [
{
"HostIp": "0.0.0.0",
"HostPort": "53"
}
],
"80/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "80"
}
],
"80/udp": null
},
"SandboxKey": "/var/run/docker/netns/a1277b4e3544",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "0b00a528bd072950e4028de991fa9c43809baddd9fd3f88e1e5a6ca83293b59a",
"Gateway": "172.17.0.1",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"MacAddress": "02:42:ac:11:00:02",
"Networks": {
"bridge": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"NetworkID": "6144c5a12d84164c03ab348072fe9e09aab41b68f4102a3b13ecf1266b1caf74",
"EndpointID": "0b00a528bd072950e4028de991fa9c43809baddd9fd3f88e1e5a6ca83293b59a",
"Gateway": "172.17.0.1",
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:11:00:02",
"DriverOpts": null
}
}
}
}
]
 

PsychoRabbit

Well-Known Member
OP
Newcomer
Joined
Nov 25, 2016
Messages
50
Trophies
0
Age
33
XP
390
Country
Argentina
For some reason, it's still not working for me, but the logs are really strange.
When I run docker inspect yadns-nx after a reboot, it suggests that the container is still running. However, I still get a name resolution error anytime I try to open a website. When I run "docker start yadns-nx" again, it works.
The logs from the inspect command don't change after I execute the start command though.

Here are the two logs:
Code:
"Status": "running"

PortBindings": {
"53/udp": [
{
"HostIp": "",
"HostPort": "53"
}
],
"80/tcp": [
{
"HostIp": "",
"HostPort": "80"
}
]
},
"RestartPolicy": {
"Name": "always",
"MaximumRetryCount": 0
}
Yep, it seems to be running OK with the ports OK and has the restart policy.
So, after the system reboots, if you do docker ps or docker container ls, nothing is shown? But doing an inspect show is theorically running? That's really wierd. Maybe do a docker logs and the container id, and check if there's an error?
If it's showing on docker ps, so it's running, you get that name resolution error on the Switch? You can at least connect to the WiFi network?
If the docker is running, going to "http://localhost:80" on the computer browser should show an "OK" message
 

MichiS97

"Leftist snowflake milennial"
Member
Joined
Jun 14, 2011
Messages
1,817
Trophies
2
Age
26
Location
Munich
XP
3,620
Country
Germany
Code:
"Status": "running"

PortBindings": {
"53/udp": [
{
"HostIp": "",
"HostPort": "53"
}
],
"80/tcp": [
{
"HostIp": "",
"HostPort": "80"
}
]
},
"RestartPolicy": {
"Name": "always",
"MaximumRetryCount": 0
}
Yep, it seems to be running OK with the ports OK and has the restart policy.
So, after the system reboots, if you do docker ps or docker container ls, nothing is shown? But doing an inspect show is theorically running? That's really wierd. Maybe do a docker logs and the container id, and check if there's an error?
If it's showing on docker ps, so it's running, you get that name resolution error on the Switch? You can at least connect to the WiFi network?
If the docker is running, going to "http://localhost:80" on the computer browser should show an "OK" message
For some reason, it seems to work now. Maybe the system just needed one more reboot :P
 
  • Like
Reactions: PsychoRabbit

PsychoRabbit

Well-Known Member
OP
Newcomer
Joined
Nov 25, 2016
Messages
50
Trophies
0
Age
33
XP
390
Country
Argentina
Using default tag: latest

Error response from daemon: Get https://registry-1.docker.io/v2/luiscassih/yadns-nx/manifests/latest: unauthorized: incorrect username or password

this was what i got after i put docker pull luiscassih/yadns-nx
The docker is public and should not require any account or login.
Maybe your docker service is already in the proccess of login with another account? Try doing a docker logout on the console and then do the docker pull again.
What OS are you using?
 
  • Like
Reactions: novalkun

novalkun

Well-Known Member
Member
Joined
Jan 21, 2017
Messages
192
Trophies
0
Age
36
XP
658
Country
Indonesia
The docker is public and should not require any account or login.
Maybe your docker service is already in the proccess of login with another account? Try doing a docker logout on the console and then do the docker pull again.
What OS are you using?

Thank you. You are right. I need to log out my docker. I haven't done the next step yet. Do you have any tools on PC to check that it connects to DNS? i am using Mac OSX
 

PsychoRabbit

Well-Known Member
OP
Newcomer
Joined
Nov 25, 2016
Messages
50
Trophies
0
Age
33
XP
390
Country
Argentina
Wow, it just one more pull to reach 1000 downloads!!
It may not be a great number for someone, but for me is great because I didn't expect to have this much. So I'm happy :) I hope it was useful.

I added a few notes to the original post. Anybody can host their own public DNS server.

You need to configure your router to let pass the port 80 and 53 tcp and 53 udp to your computer. Then you need to change the ip on the docker run command and use your public ip. Example: if your public ip is 152.168.60.227, do
docker run --name yadns-nx -d -p 80:80 -p 53:53 -p 53:53/udp --restart always luiscassih/yadns-nx 152.168.60.227
and then you will have a public dns to share at 152.168.60.227
Every Switch has to put 152.168.60.227 in their Primary DNS. However, if they want to have internet while blocking nintendo server, they need to put 8.8.8.8 (or another valid) in their Seconday DNS.

I have one more personal project in my pipeline (I'm developing a free mobile game without ads), but the next one is going to be related to the Switch. Was thinking in a homebrew app, but also it can be a website/webapp. I need to come with more ideas hehe.

Thank you all :)
 
  • Like
Reactions: hippy dave

zboubinou

Well-Known Member
Newcomer
Joined
Jul 18, 2018
Messages
48
Trophies
0
Age
39
XP
153
Country
Canada
Hi !
I tried this DNS but i'm kind of new on docker.
I installed the docker toolkit (the one with virtual box).
When i run the image it give me a long string full of character, i think it's because it's running.
But the switch still can't find internet on my network. I used my ip that i found doing a ipconfig under my wifi network adapter but i have like 2 virtualbox adapter with ip too. Did i use the right one ?
When i changed the setting of my switch i put this ip in the dns section.

Is there some way to test if the dns working except from using my switch ?

Thx
 

PsychoRabbit

Well-Known Member
OP
Newcomer
Joined
Nov 25, 2016
Messages
50
Trophies
0
Age
33
XP
390
Country
Argentina
Hi !
I tried this DNS but i'm kind of new on docker.
I installed the docker toolkit (the one with virtual box).
When i run the image it give me a long string full of character, i think it's because it's running.
But the switch still can't find internet on my network. I used my ip that i found doing a ipconfig under my wifi network adapter but i have like 2 virtualbox adapter with ip too. Did i use the right one ?
When i changed the setting of my switch i put this ip in the dns section.

Is there some way to test if the dns working except from using my switch ?

Thx

Yep, do a docker ps on the terminal/cmd to check if it's running. It should show something like this

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5988e6639c787 luiscassih/yadns-nx "docker-entrypoint.s.." 10 minutes ago Up 1 second 0.0.0.0:53->53/tcp, 0.0.0.0:80->80/tcp 0.0.0.0:53->53/udp yadns-nx

After that, on the same computer go to http://localhost/ on the browser and it should show an "OK" message.
Then after set your IP (192.168..etc) on your Primary DNS, it should connect to your WiFi network, but you will not have internet on the switch, it's only for a local connection. If you want to have internet aside from your IP in the Primary, you need another dns(e.g. 8.8.8.8 from Google) on the Secondary DNS.
 

zboubinou

Well-Known Member
Newcomer
Joined
Jul 18, 2018
Messages
48
Trophies
0
Age
39
XP
153
Country
Canada
thx for the quick answer.
It's running, the little bit difference is that in the ports i have all the ports you listed plus 80/upd but i don't think that's a pb.
But when i look for the localhost firefox give me a fail to connect page...
I'm running docker toolbox. After some tries i found that when i connect to the ip adress of my docker machine i have a page with OK. Is it the page that i need my switch to go ?
I tried putting this ip on the dns but it doesn't worked
I'm really a newbie but in my understanding what i need is my switch to connect to my pc with my ip and then connect to the docker machine ip right ? Any idea how to do this ?
 
Last edited by zboubinou,

guyman70718

Well-Known Member
Member
Joined
May 31, 2017
Messages
168
Trophies
0
Age
24
XP
507
Country
United States
I tried to make a hotspot with virtualrouter, and found my computer's IP address on the virtual network and set it in the program. My switch said that it cant resolve the DNS. Is there an extra step ill have to do?
 

PartyLoco

Member
Newcomer
Joined
Dec 31, 2018
Messages
5
Trophies
0
Age
36
XP
90
Country
Italy
I would have liked to use FTP transfer in offline mode, just to be more careful but it doesn't work so that's fine. I'm online :lol:
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: https://youtu.be/40XQ8L9wsCA?si=GzpPBaHQQLU0plt_ Neat