Ask an AI to sort out diagnoses, notifications and settings
Right after you install RoamSwitch, the diagnosis shows many findings, and the Server Edition also sends notifications. Instead of reading them one by one, ask an AI such as Claude CLI what they mean and what to do next.
What this guide does
What an AI can do is investigate and explain how to fix things. Do not let it run operations that change settings or that need sudo. Read the commands it suggests, understand them, and run them yourself. You do not need to set sudo to skip the password (NOPASSWD).
The examples use the Linux desktop and Server editions. On the Mac version too, you can ask an AI how to operate it and how to configure it.
Two ways to use it
- Paste a notification or diagnosis output into the AI. No RoamSwitch setup is needed.
- Connect the RoamSwitch MCP server to the AI. The AI reads the diagnosis and the notification records by itself. The steps are on the MCP setup page.
In both ways, the user who runs the AI does not need to be able to use sudo. This guide assumes the AI is run by a user who does not use sudo.
Examples of what to ask
| Situation | What to ask | What the AI did |
|---|---|---|
| The diagnosis shows many findings | Deal with the RoamSwitch security diagnosis | It ordered the findings by priority and walked through each check that needs root one at a time, with a check before and after running it. |
| Reviewing the settings (Server) | Review the RoamSwitch settings of this Server and suggest optimizations | It put at the top that no notification destination was set. This matched the actual setting values. |
| Reviewing the settings (Desktop) | Review the RoamSwitch settings and tell me which preset suits this PC | It read the memory usage and recommended Balanced. It also used the way to check the items that would change beforehand (dry-run). |
| You do not understand a notification | (Paste the whole notification) Tell me what it means and what I should do next | It looked up the program holding the notified port and pointed out that the machine that sent the notification and the machine it checked were different. |
| Many CVE warnings | A large number of CVE warnings are showing. Deal with them | It split the count into "needs action now" and "no fixed version yet". |
In every case, the AI did not change any setting.
Reading Server Edition notifications
The following is an example of the notification sent when a new program starts listening for the network.
- The subject contains the port number (for example, UDP 58609).
- The body says that the firewall is dropping new connections from outside, gives the commands to check (
roamswitch provenanceandss -ulnp), and says what to do if you use the program and if you do not. - The "Executable" field shows where the program is located and whether it comes from a package. A program whose file was deleted after it started is shown as "(deleted)".
If you paste the whole notification into an AI, you can ask what it means and what to do next. However, an AI can only investigate the machine it runs on. If you run the AI on a different machine from the one that sent the notification, the AI points out the difference. Run the AI on the machine that sent the notification, or paste the output of ss -ulnp and similar commands.
If you use the program, add the port to allowed_udp_ports in server.conf and run sudo roamswitch server restart. If you do not, stop the program.
Reading a notification whose owner is unknown
A notification may show "PID 0" or a "?" for the executable. This means the process holding the port could not be identified. The body of the notification says whether the firewall is dropping new connections from outside.
When the owner is unknown, the following are possible.
- The socket was opened by the kernel, for example by the kernel's WireGuard.
- The process that opened the socket ended before it was checked.
To check, run ss -ulnp again as root on the machine that sent the notification and see whether a process appears on the line of the notified port. If one does, run roamswitch provenance on that process's executable. If none does, the socket is held by the kernel or has already closed. For WireGuard, ip -d link show type wireguard and wg show confirm it.
If the same notification keeps appearing and the owner is unknown each time, run ss -ulnp right after a notification arrives.
Reviewing the settings
You can read the Server Edition settings with roamswitch server config show. Change them with sudo roamswitch server config set ITEM VALUE and apply them with sudo roamswitch server restart.
On the desktop edition, you switch settings with presets.
roamswitch preset show balanced
roamswitch preset set balanced --dry-run
roamswitch preset set balanced
--dry-run only shows the items that would change and changes nothing. Applying a preset does not need root. If some items need the daemon to be restarted after the change, the command output says so. Presets have no "undo" operation. To go back to earlier values, apply another preset with the same command. After you change a value by hand, the preset is shown as "Custom".
On the Server Edition, roamswitch preset is not available. Settings are made in server.conf.
Checking what the AI tells you
An AI's guidance can contain mistakes. Check it before you run anything.
- An AI has pointed to a group that does not exist, for example
sudo usermod -aG roamswitch USERNAME. Theroamswitchgroup is a dedicated group that exists only if the operator created it; the package does not create it. Check whether a group exists withgetent group GROUPNAME. - When the state cannot be read, the user running the AI may be neither root nor an administrator. An administrator is root or a member of the
sudogroup (wheelon Fedora and similar). - From the wording of a diagnosis item, an AI may declare that "this mechanism is not working". Check on the diagnosis screen or with
roamswitch status. - The same question can get different answers. Check numbers and flat statements such as "there is no problem" on the diagnosis screen as well.
- Run sudo commands one at a time, and after each one run the diagnosis again to see that the findings have decreased.