Skip to content

Commit c49af78

Browse files
feat: add Mikrotik documentation
1 parent 16e50d3 commit c49af78

2 files changed

Lines changed: 94 additions & 1 deletion

File tree

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ The available DDNS providers are:
8686
- [Cloudflare](https://www.cloudflare.com/application-services/products/dns/) (free plan compatible)
8787
- [Duckdns](https://www.duckdns.org/) (provider only allows a single AAAA record)
8888
- [Gravity](https://github.com/BeryJu/gravity) (hosted locally)
89-
- [Mikrotik](https://mikrotik.com/) (RouterOS API)
89+
- [Mikrotik](https://mikrotik.com/) (RouterOS API) - [Setup Guide](docs/mikrotik.md)
9090
- [OpenWrt](https://openwrt.org/) (SSH + UCI)
9191
- [OPNsense](https://opnsense.org/) (Unbound DNS via API)
9292
- [pfSense](https://www.pfsense.org/) (Unbound DNS via REST API)
@@ -157,8 +157,12 @@ discovery:
157157
plugins:
158158
- type: mikrotik
159159
params: mikrotik:90s,192.168.88.1:8729,admin,password,true,
160+
161+
# For more info on available plugins and their configuration refer to the ipv6disc project
162+
# https://github.com/miguelangel-nubla/ipv6disc#plugins
160163
```
161164

165+
162166
---
163167

164168
# What does this do?

docs/mikrotik.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Mikrotik Integration
2+
3+
`ipv6ddns` offers deep integration with Mikrotik RouterOS. It can be used as:
4+
5+
1. **DNS Provider**: Automatically creates static DNS records (`/ip/dns/static`) for discovered hosts (e.g., `nas.lan` -> `fd00::1`).
6+
2. **Discovery Source**: Uses the router's neighbor table to find active IPv6 hosts on the network.
7+
3. **Container Host**: Runs directly on the router, removing the need for a separate server.
8+
9+
**Example Scenario:**
10+
You run `ipv6ddns` in a container on your Mikrotik router. It detects your NAS and IoT devices coming online and instantly assigns them local DNS names (`nas.lan`, `cam.lan`) in the router's DNS, making them accessible by name to all your wifi clients.
11+
12+
## Discovery Plugin
13+
14+
The Mikrotik discovery plugin allows `ipv6ddns` to query the router's neighbor list and IPv6 neighbor table to find active hosts. This is useful when `ipv6ddns` is running on a device that doesn't see all network traffic (e.g., in a container or a different segment). Or just for convenience when runnning `ipv6ddns` directly as a container on RouterOS.
15+
16+
### Configuration
17+
18+
```yaml
19+
discovery:
20+
plugins:
21+
- type: mikrotik
22+
# Format: interval,address,username,password,use_tls[,tls_fingerprint]
23+
params: 60s,192.168.88.1:8729,admin,password,true
24+
```
25+
26+
For more details on the parameters, refer to the [ipv6disc documentation](https://github.com/miguelangel-nubla/ipv6disc#plugins).
27+
28+
---
29+
30+
## DNS Provider
31+
32+
The Mikrotik provider allows `ipv6ddns` to update static DNS entries (`/ip/dns/static`) on your router. This is useful for local DNS resolution of your IPv6 hosts.
33+
34+
### Configuration
35+
36+
```yaml
37+
credentials:
38+
myrouter:
39+
provider: mikrotik
40+
settings:
41+
# API port (default 8728 for cleartext, 8729 for TLS)
42+
address: 192.168.88.1:8728
43+
# Recommended: use TLS (requires API-SSL service on router)
44+
use_tls: true
45+
# If certificate cannot be validated you must provide the SHA256 fingerprint of the router's certificate. Run empty to get the fingerprint.
46+
tls_fingerprint: ""
47+
# Credentials
48+
username: admin
49+
password: password
50+
# The domain zone to append to hostnames (e.g. host.lan)
51+
zone: lan
52+
# TTL for the DNS records
53+
ttl: 5m
54+
```
55+
56+
### Requirements
57+
- **API User**: Create a user on the router with `read`, `write` and `api` permissions.
58+
- **API Service**: Ensure `api` (port 8728) or `api-ssl` (port 8729) service is enabled under `/ip/service`.
59+
60+
---
61+
62+
## Running as a Container on RouterOS
63+
64+
You can run `ipv6ddns` directly on your Mikrotik router using the Container feature (available in RouterOS v7.4+).
65+
66+
### 1. Enable Container Support
67+
Check out the [Mikrotik Container Documentation](https://help.mikrotik.com/docs/spaces/ROS/pages/84901929/Container) for instructions on how to enable and configure the container feature.
68+
69+
### 2. Configure Network
70+
Create a VETH interface and bridge it to your LAN so the container can see network traffic (essential for NDP discovery if not using plugins).
71+
72+
> [!NOTE]
73+
> If you plan on using an external DNS provider (e.g. Cloudflare, Route53), you must ensure the container has internet access via this VETH interface (e.g., via NAT masquerade or proper routing).
74+
75+
> [!TIP]
76+
> When running as a container on the router itself, it is recommended to use the [Mikrotik Discovery Plugin](#discovery-plugin) instead of relying on active discovery. While active discovery works if the VETH is bridged correctly, the plugin is more efficient and reliable in this environment, as it uses the router's internal tables.
77+
78+
### 3. Mount Configuration
79+
Upload your `config.yaml` to the router (e.g., via SFTP or Drag & Drop on WinBox->Files).
80+
81+
### 4. Create and start the Container
82+
83+
The container image is available at:
84+
`ghcr.io/miguelangel-nubla/ipv6ddns:latest`
85+
86+
You just need to create a container with this image and mount the config file at `/config.yaml`.
87+
88+
### Notes
89+
- **Storage**: `ipv6ddns` runs entirely in memory and does not write to disk, so it is safe to run on internal flash without wear concerns. However, external storage (USB/SD) is widely recommended because the container image size may exceed the available internal flash space on many devices.

0 commit comments

Comments
 (0)