This work is forked from https://github.com/nethesis/nethserver-flashstart
This package is forked from implements DNS filtering using Flashstart servers.
Every request from local zones to port tcp/udp 53, is redirected to Unbound.
Unbound is configured as follow:
- Forward queries for server machine domain to dnsmasq
- Forward reverse queries for all green interfaces to dnsmasq
- Forward every remaining query to Flashstart DNS (
188.94.192.215and45.76.84.187)
Please note that queries from the server itself are never filtered.
Note: When this package is installed, DNSBL from nethserver-mail-filter may not correctly work.
Properties:
Bypass: comma-separeted list of firewall object (or ip addresses) which are not redirect to Unbound. Flashstart DNS can't be bypassed if the client is using Squid to surf the web.Password: password for Flashstart serviceRoles: comma-separated list of Roles, default togreen. Theredrole is not allowed.Username: user name for Flashstart servicestatus: can beenabledordisabled. Default todisabled.UpdateInterval: a cronjob to update the WAN IP address is executed eachUpdateIntervalminutes. Default 30.PortalUrl: portal URL to be used inside the UI
Example:
flashstart=configuration
Bypass=
Password=11223344
PortalUrl=https://flashstart.nethesis.it
Roles=green
Username=test@nethesis.it
status=enabled
After registering at https://flashstart.nethesis.it, configure Flashstart and enable access to Unbound:
config setprop flashstart status enabled
config setprop flashstart Password <pass>
config setprop flashstart Username <user>
signal-event nethserver-flashstart-hybrid-save
Changing the update interval:
config setprop flashstart UpdateInterval 5
signal-event nethserver-flashstart-hybrid-save
If you need to notify a public IP has change, execute:
/etc/e-smith/events/actions/nethserver-flashstart-hybrid-auth-ip
This api can return:
flashstartconfiguration- the list of network roles configured on the system: only
green,blueandhotspotroles are considered.
config:flashstart,networkRolesordashboard
{
"config": "flashstart"
}
{
"configuration": {
"type": "configuration",
"name": "flashstart",
"props": {
"status": "enabled",
"Username": "user@company.com",
"Roles": "green",
"Bypass": "10.20.30.40,11.22.33.0/24",
"UpdateInterval": "30",
"Password": "s3cr3t!"
}
}
}
{
"config": "networkRoles"
}
{
"configuration": {
"networkRoles": [
"blue",
"green"
]
}
}
{
"config": "dashboard"
}
{
"configuration": {
"loginOk": true,
"flashstartEnabled": "enabled"
}
}
This api validates the input before updating flashstart configuration.
enableFlashstart: toggles FlashStart activation, can beenabledordisabledusername: username of FlashStart accountpassword: password of FlashStart accountrolesFilter: specifies on which types of networks FlashStart filter should be enabledbypass: list of source IP addresses and/or networks in CIDR notation on which FlashStart filter should be disabled
{
"enableFlashstart": "enabled",
"username": "user@company.com",
"password": "s3cr3t!",
"rolesFilter": [
"green"
],
"bypass": [
"10.20.30.40",
"11.22.33.0/24"
]
}
{
"state": "success"
}
This api updates flashstart configuration.
Same input as validate.