大网数据广告活动
服务器运维问答

Wildcard subdomain routing from WAN to LAN

· 52CE 我爱测

My current setup: I don't have a static IP from my ISP, so I run my own ddns on a Google Cloud instance The ddns I'm running is a docker image from https://github.com/dprandzioch/docker-ddns , and I followed the instructions to c…

问题原文

原帖链接 · ad_on_is · CC BY-SA 4.0

My current setup:

  • I don't have a static IP from my ISP, so I run my own ddns on a Google Cloud instance
  • The ddns I'm running is a docker image from https://github.com/dprandzioch/docker-ddns, and I followed the instructions to configure the Google Cloud DNS
  • The domain foo.dyndns.domain.tld successfully points to my public IP address
  • At home, I have an Asus AC56U router with dnsmasq running on it.
  • dnsmasq points all local.dev requests to my local webserver
  • I've enabled port-forwarding for port 80 to my web-server

My dnsmasq configuration on my AC56U router

address=/local.dev/foo.dyndns.domain.tld/192.168.1.100

My DNS settings in Google Cloud DNS

ns.domain.tld.             A       300   35.xx.xx.xx
dyndns.domain.tld          NS      300   ns.domain.tld

What currently works:

  • All *.local.dev requests, successfully point to my webserver within my LAN network
  • foo.dyndns.domain.tld successfully points to my webserver outside of my LAN ping foo.dyndns.domain.tld returns my public IP.

What I need

  • *.foo.dyndns.domain.tld to point to my webserver outside of my LAN network ping test.foo.dyndns.domain.tld results in Unknown host
  • I'd like it to happen automatically, so without updating NS records for every new project I start working on.

What's the point?

I'm a web- and mobile app developer, and I'd like to allow my clients to access my local dev-server. Unfortunately, my networking experiences are very limited.

What I tried so far

I tried updating my Google Cloud DNS with the following record, but without any success:

*.foo.dyndns.domain.tld    CNAME   300   dyndns.domain.tld

已采纳解答

原帖链接 · ad_on_is · CC BY-SA 4.0

With some trial and error, I finally found the solution:

As described in the tutorial: https://github.com/dprandzioch/docker-ddns on how to set up the DNS, I just had to pass *.foo as the domain parameter.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-06-05)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。