(Shameless nip.io ripoff written in Rust)
Wildcard DNS for any IP Address. RustyAlias allows you to map any IP Address to a hostname using the following formats (dot, dash or hex):
Without a name:
10.0.0.1.example.commaps to 10.0.0.1192-168-1-250.example.commaps to 192.168.1.250a000803.example.commaps to 10.0.8.32a04-4e42-200--201.example.commaps to 2a04:4e42:200::201
With a name:
app.10.8.0.1.example.commaps to 10.8.0.1app-116-203-255-68.example.commaps to 116.203.255.68app-c0a801fc.example.commaps to 192.168.1.252customer1.app.10.0.0.1.example.commaps to 10.0.0.1customer2-app-127-0-0-1.example.commaps to 127.0.0.1customer3-app-7f000101.example.commaps to 127.0.1.1customer4.2a04-4e42-200--201.example.commaps to 2a04:4e42:200::201
Version TXT record:
versionreturns RustyAlias v1.6.0verreturns RustyAlias v1.6.0vreturns RustyAlias v1.6.0
A public demo instance is available at ns.addr.se. You can resolve any IP Address against it using the formats described above, for example:
app.127.0.0.1.ns.addr.semaps to 127.0.0.1192-168-1-250.ns.addr.semaps to 192.168.1.250app-c0a801fc.ns.addr.semaps to 192.168.1.2522a04-4e42-200--201.ns.addr.semaps to 2a04:4e42:200::201
Try it out:
dig app.127.0.0.1.ns.addr.se
...
;; QUESTION SECTION:
;app.127.0.0.1.ns.addr.se. IN A
;; ANSWER SECTION:
app.127.0.0.1.ns.addr.se. 60 IN A 127.0.0.1docker compose up -dpodman run --rm -d \
--name rustyalias \
-p 53:5053/udp \
-e RUST_LOG=info \
-e GLUE_NAME=ns.example.com \
-e SOA_NAME=ns.example.com \
-e HOSTMASTER=hostmaster.example.com \
ghcr.io/stenstromen/rustyalias:latestRUST_LOG=debug cargo rundig @127.0.0.1 -p 5053 1337-c0a801fc.example.com
...
;; QUESTION SECTION:
;1337-c0a801fc.example.com. IN A
;; ANSWER SECTION:
1337-c0a801fc.example.com. 60 IN A 192.168.1.252This project uses the following environment variables:
| Variable Name | Description | Default Value |
|---|---|---|
RUST_LOG |
The logging level (debug, info). |
None (no logging) |
GLUE_NAME |
Wildcard DNS name. | ns.example.com |
GLUE_IP |
DNS Server IPv4 Address | 127.0.0.1 |
SOA_NAME |
Start of Authority name. | ns.example.com |
HOSTMASTER |
Hostmaster name. | hostmaster.example.com |
SERIAL |
SOA Serial number. | 1 |
REFRESH |
SOA Refresh interval. | 3600 |
RETRY |
SOA Retry interval. | 1800 |
EXPIRE |
SOA Expiration interval. | 604800 |
MINIMUM |
SOA Minimum TTL. | 3600 |
RATE_LIMIT_REQUESTS |
Max requests per source IP per window. 0 disables rate limiting. |
0 |
RATE_LIMIT_SECONDS |
Length of the rate-limit window in seconds. 0 disables rate limiting. |
0 |
Rate limiting is off by default. To enable, set both variables to non-zero values. For example, to allow at most 20 requests per source IP every 1 second:
RATE_LIMIT_REQUESTS=20 RATE_LIMIT_SECONDS=1 cargo runRate-limited queries are silently dropped (sending a response to a possibly spoofed source would amplify attacks).
- Public demo instance
- Docker Compose
- Cloudflare integration
- Rate limit
- ARM64 support

