jokob-sk / NetAlertX

🖧🔍 WIFI / LAN intruder detector. Scans for devices connected to your network and alerts you if new and unknown devices are found.
GNU General Public License v3.0
3k stars 181 forks source link

can't save settings from UI #822

Closed albertcuy closed 3 weeks ago

albertcuy commented 3 weeks ago

Is there an existing issue for this?

Current Behavior

i cant save changes on the Settings page. Workaround is to bash into the docker image and manually edit app.conf

Expected Behavior

that i can save changes i made on the UI

Steps To Reproduce

Go to Settings and try to change any items

app.conf

#-----------------AUTOGENERATED FILE-----------------#
#                                                    #
#         Generated:  2022-12-30_22-19-40            #
#                                                    #
#   Config file for the LAN intruder detection app:  #
#      https://github.com/jokob-sk/NetAlertX         #
#                                                    #
#-----------------AUTOGENERATED FILE-----------------#

# 🔺 Use the Settings UI - only edit when necessary 🔺

# General
#---------------------------
# Scan using interface eth0
# SCAN_SUBNETS    = ['192.168.1.0/24 --interface=eth0']
#
# Scan multiple interfaces (eth1 and eth0):
# SCAN_SUBNETS    = [ '192.168.1.0/24 --interface=eth1', '192.168.1.0/24 --interface=eth0' ]

SCAN_SUBNETS=['192.168.2.0/24 --interface=enX0', '10.18.0.0/16 --interface=enX0', '10.16.0.0/16 --interface=enX0']
TIMEZONE='Asia/Manila'
LOADED_PLUGINS = ['ARPSCAN','CSVBCKP','DBCLNP', 'INTRNT','MAINT','NEWDEV','NSLOOKUP','NTFPRCS', 'PHOLUS','SETPWD','SMTP', 'SYNC', 'VNDRPDT', 'WORKFLOWS', 'NMAP', 
'NMAPDEV', 'NBTSCAN']

DAYS_TO_KEEP_EVENTS=90
# Used for generating links in emails. Make sure not to add a trailing slash!
REPORT_DASHBOARD_URL='http://netalertx'

# Make sure at least these scanners are enabled for new installs, other defaults are taken from the config.json
INTRNT_RUN='schedule'
ARPSCAN_RUN='schedule'
PHOLUS_RUN='on_new_device'
NSLOOKUP_RUN='before_name_updates'
NMAP_RUN='schedule'
NMAP_RUN_SCHD='56 11 * * * '
NBTSCAN_RUN='schedule'

# Email 
#-------------------------------------
# (add SMTP to LOADED_PLUGINS to load)
#-------------------------------------
SMTP_RUN='disabled'  # use 'on_notification' to enable
SMTP_SERVER='smtp.gmail.com'
SMTP_PORT=587
SMTP_REPORT_TO='user@gmail.com'
SMTP_REPORT_FROM='NetAlertX <user@gmail.com>'
SMTP_SKIP_LOGIN=False
SMTP_USER='user@gmail.com'
SMTP_PASS='password'
SMTP_SKIP_TLS=False

# Webhook 
#-------------------------------------
# (add WEBHOOK to LOADED_PLUGINS to load)
#-------------------------------------
WEBHOOK_RUN='disabled'  # use 'on_notification' to enable
WEBHOOK_URL='http://n8n.local:5555/webhook-test/aaaaaaaa-aaaa-aaaa-aaaaa-aaaaaaaaaaaa'
WEBHOOK_PAYLOAD='json'                 # webhook payload data format for the "body > attachements > text" attribute 
                                       # in https://github.com/jokob-sk/NetAlertX/blob/main/docs/webhook_json_sample.json 
                                       #   supported values: 'json', 'html' or 'text'
                                       #   e.g.: for discord use 'html'
WEBHOOK_REQUEST_METHOD='GET'

# Apprise 
#-------------------------------------
# (add APPRISE to LOADED_PLUGINS to load)
#-------------------------------------
APPRISE_RUN='disabled'  # use 'on_notification' to enable
APPRISE_HOST='http://localhost:8000/notify'
APPRISE_URL='mailto://smtp-relay.sendinblue.com:587?from=user@gmail.com&name=apprise&user=user@gmail.com&pass=password&to=user@gmail.com'

# NTFY
#------------------------------------- 
# (add NTFY to LOADED_PLUGINS to load)
#-------------------------------------
NTFY_RUN='disabled'  # use 'on_notification' to enable
NTFY_HOST='https://ntfy.sh'
NTFY_TOPIC='replace_my_secure_topicname_91h889f28'
NTFY_USER='user'
NTFY_PASSWORD='passw0rd'

# PUSHSAFER 
#-------------------------------------
# (add PUSHSAFER to LOADED_PLUGINS to load)
#-------------------------------------
PUSHSAFER_RUN='disabled'  # use 'on_notification' to enable
PUSHSAFER_TOKEN='ApiKey'

# MQTT 
#-------------------------------------
# (add MQTT to LOADED_PLUGINS to load)
#-------------------------------------
MQTT_RUN='disabled'  # use 'on_notification' to enable
MQTT_BROKER='192.168.1.2'
MQTT_PORT=1883
MQTT_USER='mqtt'
MQTT_PASSWORD='passw0rd'
MQTT_QOS=0
MQTT_DELAY_SEC=2

#-------------------IMPORTANT INFO-------------------#
#   This file is ingested by a python script, so if  #
#        modified it needs to use python syntax      #
#-------------------IMPORTANT INFO-------------------#

docker-compose.yml

No response

What branch are you running?

Production

app.log

No response

Debug enabled

jokob-sk commented 3 weeks ago

Hi @albertcuy ,

Can you post a screenshot of your browser dev console (F12) if there are any errors?

What browser are you using?

Could you please make sure your permissions are setup appropriately: https://github.com/jokob-sk/NetAlertX/blob/main/docs/FILE_PERMISSIONS.md

albertcuy commented 3 weeks ago

Apologies, it appears the firewall was causing the issue. Can be closed. Thank you