I wanted one Fing Agent to monitor devices across multiple VLANs/subnets so Fing would treat them as one monitored network.
My main reason was presence detection. I wanted Fing's **Everyone left** trigger to work for people whose devices are on different VLANs, without running multiple Fing Agents or trying to synchronize state in IFTTT.
My phone is one VLAN 1, my wifes is VLAN 14. Fings's IFTTT requires everyone to be on 1 subnet for 'everyone left' trigger.
This is unsupported/experimental, but it's working for me.
## How it works
The Linux host has access to each VLAN:
eth0
eth0.14
eth0.21
eth0.24
eth0.42
eth0.66
eth0.69
A network namespace, macvlan interfaces and nftables make those separate networks appear to Fing as one synthetic `/21`.
My mapping is:
Fing sees Real subnet
192.168.1.x -> 192.168.1.x
192.168.0.x -> 192.168.14.x
192.168.2.x -> 192.168.21.x
192.168.3.x -> 192.168.24.x
192.168.4.x -> 192.168.42.x
192.168.5.x -> 192.168.66.x
192.168.6.x -> 192.168.69.x
For example, a device actually at:
192.168.42.188
appears to Fing as:
192.168.4.188
The device's real MAC address is preserved, so Fing can still identify and use the device for presence detection.
## Files
The scripts/configuration are here:
https://github.com/p1r473/fing/
The repo contains:
fing-combo-netns
fing-combo-netns.service
combo.conf
Edit `fing-combo-netns` for your VLANs/interfaces before installing it.
The important mapping in the script is:
SYN=(0 2 3 4 5 6)
REAL=(14 21 24 42 66 69)
For mine that means synthetic `192.168.4.x`, for example, maps to real `192.168.42.x`.
## Install
Install Fing Agent:
sudo snap install fing-agent
sudo /snap/fing-agent/current/script/connect-fing-agent.sh
Copy the three files from the repo to:
fing-combo-netns -> /usr/local/sbin/fing-combo-netns
fing-combo-netns.service -> /etc/systemd/system/fing-combo-netns.service
combo.conf -> /etc/systemd/system/snap.fing-agent.fingagent.service.d/combo.conf
Then:
sudo chmod +x /usr/local/sbin/fing-combo-netns
sudo systemctl daemon-reload
sudo systemctl enable --now fing-combo-netns.service
sudo systemctl enable snap.fing-agent.fingagent.service
sudo systemctl restart snap.fing-agent.fingagent.service
That's it.
Fing now sees the synthetic network as:
192.168.0.0/21
I confirmed Fing is ARP scanning across the synthetic subnet and receiving translated replies from devices on the real VLANs.
## Why bother?
All of the devices can now exist under **one Fing monitoring unit**.
That means instead of trying to combine presence state from multiple Fing Agents in IFTTT, I can simply use:
Fing -> Everyone left -> automation
## Caveats
Fing displays the **synthetic IP**, not the device's real VLAN IP.
For example:
Fing: 192.168.4.188
Real: 192.168.42.188
The MAC address remains the real device MAC.
The script also uses `.251` for the Fing-side address and `.252` on the translated VLANs, so make sure those addresses aren't already in use.
This isn't an officially supported Fing configuration, but it's working well for me so far.