Gnome Remote Desktop -- Allow over Ethernet and block over WiFi?

  • #1
Swamp Thing
Insights Author
970
670
Is it possible to configure Gnome Remote Desktop to share the desktop over the Ethernet interface but block connections over WiFi? Where is the config file for this daemon?
 
Computer science news on Phys.org
  • #2
You can try these steps:

Yes, it is possible to configure GNOME Remote Deskto by controlling access at the network level using firewall rules or configuring GNOME Remote Desktop to bind specifically to the Ethernet interface.

NOTE: I've never attempted this.

Find the GNOME Remote Desktop Service Configuration File:

GNOME Remote Desktop is managed by gnome-remote-desktop. Its configuration is typically stored in:

Bash:
~/.config/gnome-remote-desktop

You may find files such as server.conf or similar. However, these files do not typically allow interface-specific configurations.

Configure Firewall Rules:

To limit access to Ethernet:

Bash:
ip link

Typically, Ethernet is eth0 or similar, and WiFi is wlan0.

Use ufw (Uncomplicated Firewall) or iptables to allow traffic only on the Ethernet interface. For example:

Bash:
sudo ufw allow in on eth0

sudo ufw deny in on wlan0

Or, using iptables:

Bash:
sudo iptables -A INPUT -i eth0 -p tcp --dport 3389 -j ACCEPT

sudo iptables -A INPUT -i wlan0 -p tcp --dport 3389 -j DROP

Replace 3389 with the port GNOME Remote Desktop is configured to use (commonly used for RDP or VNC).

Restart GNOME Remote Desktop:

After making changes, restart the GNOME Remote Desktop service:

Bash:
systemctl --user restart gnome-remote-desktop
 
  • Informative
Likes FactChecker, Swamp Thing and berkeman
Back
Top