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
3.13k stars 187 forks source link

Can not add Interface to Settings —> Core —> Networks to scan #834

Closed paranoyd1988 closed 1 month ago

paranoyd1988 commented 1 month ago

Is there an existing issue for this?

Current Behavior

I can add my network. It will be listed and I can choose it. When I save the Settings this field is empty again.

IMG_0977 IMG_0978 IMG_0979

Expected Behavior

The Network will be shown in this List, when it is selectet.

Steps To Reproduce

No response

app.conf

{
    "AppArmorProfile": "",
    "Args": [],
    "Config": {
        "AttachStderr": false,
        "AttachStdin": false,
        "AttachStdout": false,
        "Cmd": null,
        "Domainname": "",
        "Entrypoint": [
            "/init"
        ],
        "Env": [
            "TZ=Europe/Berlin",
            "PORT=20211",
            "PATH=/opt/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
            "LISTEN_ADDR=0.0.0.0",
            "S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0"
        ],
        "Healthcheck": {
            "Interval": 30000000000,
            "Retries": 2,
            "StartPeriod": 15000000000,
            "Test": [
                "CMD-SHELL",
                "curl -sf -o /dev/null ${LISTEN_ADDR}:${PORT}/api/app_state.json"
            ],
            "Timeout": 5000000000
        },
        "Hostname": "docker-vm",
        "Image": "jokobsk/netalertx:latest",
        "Labels": {
            "org.opencontainers.image.created": "2024-09-25T22:53:18.351Z",
            "org.opencontainers.image.description": "🖧🔍 WIFI / LAN intruder detector.  Scans for devices connected to your network and alerts you if new and unknown devices are found.",
            "org.opencontainers.image.licenses": "GPL-3.0",
            "org.opencontainers.image.revision": "15a7779d6ebda530558710e7ccb479c3fdeb6ad6",
            "org.opencontainers.image.source": "https://github.com/jokob-sk/NetAlertX",
            "org.opencontainers.image.title": "NetAlertX",
            "org.opencontainers.image.url": "https://github.com/jokob-sk/NetAlertX",
            "org.opencontainers.image.version": "24.9.26"
        },
        "OnBuild": null,
        "OpenStdin": false,
        "StdinOnce": false,
        "Tty": false,
        "User": "",
        "Volumes": null,
        "WorkingDir": ""
    },
    "Created": "2024-10-10T11:12:48.363339138Z",
    "Driver": "overlay2",
    "ExecIDs": [
        "1ef6cbb61bfbc9a38342e9a77d77f104a2f6ac3ed27dc3643a8ac9050bf6e16b"
    ],
    "GraphDriver": {
        "Data": {
            "LowerDir": "/var/lib/docker/overlay2/f33bdea3147704a8b0ac8a4e3860e620e2b5097e9694fb0c2f355fbfe5d91c6e-init/diff:/var/lib/docker/overlay2/d9127801f6865bcb2b1d28ad16e549a838355c9efb4781edc3d2c9d4a09b59f2/diff:/var/lib/docker/overlay2/fd33e27783ee0427d79ba139591864c1ebe9894ed3560c03d4faf0d70c348dc2/diff:/var/lib/docker/overlay2/22e332bc8c8db284d787b02fd6aa60fab251aa0b46f0d557b10c8de71ede9419/diff:/var/lib/docker/overlay2/95349d896517df28117a356f3fa00b228306c47fbedc3f703d42aca96132f3c4/diff:/var/lib/docker/overlay2/56a5a04da25a1d8b7e63179f9de11e2c04d29b997f9efdf74d58b5c57d8b2358/diff:/var/lib/docker/overlay2/776cd0125ecfe5f32f972efc55d023e77bf4dd68d5f615b6ba3d8f6f3050dbd0/diff",
            "MergedDir": "/var/lib/docker/overlay2/f33bdea3147704a8b0ac8a4e3860e620e2b5097e9694fb0c2f355fbfe5d91c6e/merged",
            "UpperDir": "/var/lib/docker/overlay2/f33bdea3147704a8b0ac8a4e3860e620e2b5097e9694fb0c2f355fbfe5d91c6e/diff",
            "WorkDir": "/var/lib/docker/overlay2/f33bdea3147704a8b0ac8a4e3860e620e2b5097e9694fb0c2f355fbfe5d91c6e/work"
        },
        "Name": "overlay2"
    },
    "HostConfig": {
        "AutoRemove": true,
        "Binds": [
            "/var/lib/docker/volumes/netalertx/config:/app/config",
            "/var/lib/docker/volumes/netalertx/db:/app/db"
        ],
        "BlkioDeviceReadBps": [],
        "BlkioDeviceReadIOps": [],
        "BlkioDeviceWriteBps": [],
        "BlkioDeviceWriteIOps": [],
        "BlkioWeight": 0,
        "BlkioWeightDevice": [],
        "CapAdd": null,
        "CapDrop": null,
        "Cgroup": "",
        "CgroupParent": "",
        "CgroupnsMode": "private",
        "ConsoleSize": [
            16,
            94
        ],
        "ContainerIDFile": "",
        "CpuCount": 0,
        "CpuPercent": 0,
        "CpuPeriod": 0,
        "CpuQuota": 0,
        "CpuRealtimePeriod": 0,
        "CpuRealtimeRuntime": 0,
        "CpuShares": 0,
        "CpusetCpus": "",
        "CpusetMems": "",
        "DeviceCgroupRules": null,
        "DeviceRequests": null,
        "Devices": [],
        "Dns": [],
        "DnsOptions": [],
        "DnsSearch": [],
        "ExtraHosts": null,
        "GroupAdd": null,
        "IOMaximumBandwidth": 0,
        "IOMaximumIOps": 0,
        "IpcMode": "private",
        "Isolation": "",
        "Links": null,
        "LogConfig": {
            "Config": {},
            "Type": "json-file"
        },
        "MaskedPaths": [
            "/proc/asound",
            "/proc/acpi",
            "/proc/kcore",
            "/proc/keys",
            "/proc/latency_stats",
            "/proc/timer_list",
            "/proc/timer_stats",
            "/proc/sched_debug",
            "/proc/scsi",
            "/sys/firmware",
            "/sys/devices/virtual/powercap"
        ],
        "Memory": 0,
        "MemoryReservation": 0,
        "MemorySwap": 0,
        "MemorySwappiness": null,
        "NanoCpus": 0,
        "NetworkMode": "host",
        "OomKillDisable": null,
        "OomScoreAdj": 0,
        "PidMode": "",
        "PidsLimit": null,
        "PortBindings": {},
        "Privileged": false,
        "PublishAllPorts": false,
        "ReadonlyPaths": [
            "/proc/bus",
            "/proc/fs",
            "/proc/irq",
            "/proc/sys",
            "/proc/sysrq-trigger"
        ],
        "ReadonlyRootfs": false,
        "RestartPolicy": {
            "MaximumRetryCount": 0,
            "Name": "no"
        },
        "Runtime": "runc",
        "SecurityOpt": null,
        "ShmSize": 67108864,
        "UTSMode": "",
        "Ulimits": [],
        "UsernsMode": "",
        "VolumeDriver": "",
        "VolumesFrom": null
    },
    "HostnamePath": "/var/lib/docker/containers/9064180e2384a47962a1c06dac40150d0ee88e973acbcd8a0308d087531647eb/hostname",
    "HostsPath": "/var/lib/docker/containers/9064180e2384a47962a1c06dac40150d0ee88e973acbcd8a0308d087531647eb/hosts",
    "Id": "9064180e2384a47962a1c06dac40150d0ee88e973acbcd8a0308d087531647eb",
    "Image": "sha256:01c709a03f7e909019111341240620c2061516093c6d138d0db39eb0589b73fa",
    "LogPath": "/var/lib/docker/containers/9064180e2384a47962a1c06dac40150d0ee88e973acbcd8a0308d087531647eb/9064180e2384a47962a1c06dac40150d0ee88e973acbcd8a0308d087531647eb-json.log",
    "MountLabel": "",
    "Mounts": [
        {
            "Destination": "/app/config",
            "Mode": "",
            "Propagation": "rslave",
            "RW": true,
            "Source": "/var/lib/docker/volumes/netalertx/config",
            "Type": "bind"
        },
        {
            "Destination": "/app/db",
            "Mode": "",
            "Propagation": "rslave",
            "RW": true,
            "Source": "/var/lib/docker/volumes/netalertx/db",
            "Type": "bind"
        }
    ],
    "Name": "/netalertx",
    "NetworkSettings": {
        "Bridge": "",
        "EndpointID": "",
        "Gateway": "",
        "GlobalIPv6Address": "",
        "GlobalIPv6PrefixLen": 0,
        "HairpinMode": false,
        "IPAddress": "",
        "IPPrefixLen": 0,
        "IPv6Gateway": "",
        "LinkLocalIPv6Address": "",
        "LinkLocalIPv6PrefixLen": 0,
        "MacAddress": "",
        "Networks": {
            "host": {
                "Aliases": null,
                "DNSNames": [
                    "netalertx",
                    "9064180e2384",
                    "docker-vm"
                ],
                "DriverOpts": null,
                "EndpointID": "be2862eb2df79fefb8ccafaeffabebfd6d219778f99cc10a1205cbc7103ce434",
                "Gateway": "",
                "GlobalIPv6Address": "",
                "GlobalIPv6PrefixLen": 0,
                "IPAMConfig": null,
                "IPAddress": "",
                "IPPrefixLen": 0,
                "IPv6Gateway": "",
                "Links": null,
                "MacAddress": "",
                "NetworkID": "0e5da1305706c90c5409854be982f334b76e54420c4aa86021f15523198782b5"
            }
        },
        "Ports": {},
        "SandboxID": "68756f7023db0e18487867b2b84e7e58875ac6b1912a7b406c6aad3b2b3298bc",
        "SandboxKey": "/var/run/docker/netns/default",
        "SecondaryIPAddresses": null,
        "SecondaryIPv6Addresses": null
    },
    "Path": "/init",
    "Platform": "linux",
    "ProcessLabel": "",
    "ResolvConfPath": "/var/lib/docker/containers/9064180e2384a47962a1c06dac40150d0ee88e973acbcd8a0308d087531647eb/resolv.conf",
    "RestartCount": 0,
    "State": {
        "Dead": false,
        "Error": "",
        "ExitCode": 0,
        "FinishedAt": "0001-01-01T00:00:00Z",
        "Health": {
            "FailingStreak": 0,
            "Log": [
                {
                    "End": "2024-10-10T11:52:57.289373766Z",
                    "ExitCode": 0,
                    "Output": "",
                    "Start": "2024-10-10T11:52:57.243572401Z"
                },
                {
                    "End": "2024-10-10T11:53:27.340511167Z",
                    "ExitCode": 0,
                    "Output": "",
                    "Start": "2024-10-10T11:53:27.2904978Z"
                },
                {
                    "End": "2024-10-10T11:53:57.385313518Z",
                    "ExitCode": 0,
                    "Output": "",
                    "Start": "2024-10-10T11:53:57.341647311Z"
                },
                {
                    "End": "2024-10-10T11:54:27.435222287Z",
                    "ExitCode": 0,
                    "Output": "",
                    "Start": "2024-10-10T11:54:27.38658418Z"
                },
                {
                    "End": "2024-10-10T11:54:57.479235985Z",
                    "ExitCode": 0,
                    "Output": "",
                    "Start": "2024-10-10T11:54:57.435572695Z"
                }
            ],
            "Status": "healthy"
        },
        "OOMKilled": false,
        "Paused": false,
        "Pid": 124585,
        "Restarting": false,
        "Running": true,
        "StartedAt": "2024-10-10T11:12:48.463944982Z",
        "Status": "running"
    }
}

docker-compose.yml

docker run -d --rm --network=host \
  -v /var/lib/docker/volumes/netalertx/config:/app/config \
  -v /var/lib/docker/volumes/netalertx/db:/app/db \
  -e TZ=Europe/Berlin \
  -e PORT=20211 \
  jokobsk/netalertx:latest

What branch are you running?

Production

app.log

No response

Debug enabled

jokob-sk commented 1 month ago

Hi there,

What browser are you using? The app is tested to work on Firefox and Chrome.

Are you clicking save after adding a new subnet?

Thanks, J

paranoyd1988 commented 1 month ago

I use Safari, but I will Test it with Firefox.

And yes, after adding I click save.

paranoyd1988 commented 1 month ago

Ok, it was my fault. With Firefox everything is fine.

jokob-sk commented 1 month ago

Thanks, it's nobody's fault 🙂 Also, if you want to help and are a developer, I'm more than happy to accept a PR to fix this in Safari. 😄 I myself don't own any Apple devices so can't support it in the first place.

Closing this now as resolved.