Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions packages/ns-flashstart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,18 @@ uci commit flashstart
reload_config
```

## DNS server customization

You can disable `rebind_protection` or enable `logqueries` options for the DNS servers by setting the variables in the
`flashstart.global` section:

```
uci set flashstart.global.rebind_protection="0"
uci set flashstart.global.logqueries="1"
uci commit flashstart
reload_config
```

## Debug mode

The daemon can be run in various logging levels, to set the levels you can:
Expand Down
4 changes: 4 additions & 0 deletions packages/ns-flashstart/files/ns-flashstart
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ def __sync_pro_profiles():


def __add_profile(port, profile):
query_logging = e_uci.get('flashstart', 'global', 'logqueries', default=False, dtype=bool)
rebind_protection = e_uci.get('flashstart', 'global', 'rebind_protection', default=True, dtype=bool)
if e_uci.get('dhcp', profile['id'], default=None) is None:
logging.info(f'New profile found {profile["name"]}, creating instance {profile["id"]}.')
e_uci.set('dhcp', profile['id'], 'dnsmasq')
Expand All @@ -224,6 +226,8 @@ def __add_profile(port, profile):
e_uci.set('dhcp', profile['id'], 'noresolv', True)
e_uci.set('dhcp', profile['id'], 'max_ttl', 60)
e_uci.set('dhcp', profile['id'], 'max_cache_ttl', 60)
e_uci.set('dhcp', profile['id'], 'logqueries', query_logging)
e_uci.set('dhcp', profile['id'], 'rebind_protection', rebind_protection)
# sets always get replaced, checking before replacing
custom_servers = list(e_uci.get('flashstart', 'global', 'custom_servers', list=True, dtype=str, default=[]))
servers = sorted(custom_servers + profile['servers'])
Expand Down
Loading