Rubin Starset 4 Posted January 6, 2021 Share Posted January 6, 2021 Hi there. Windows 10 server, Debian client. The Server is a desktop with a static address on an ethernet NIC, and the Debian client is a laptop with both wifi and ethernet through a dock both with separate static addresses. The client likes to connect to the server primarily through my wifi interface. I'd like it to only connect via the ethernet interface (which coincides with when the laptop is actually docked right next to my Windows displays. The messy solution I have is to simply block the Synergy port via an iptables rule for the wifi interface. I'd just like to have a bind to IP/interface that's part of the Synergy client. I couldn't find any info on such a thing, does it exist? 1 Link to post Share on other sites
Rubin Starset 4 Posted January 6, 2021 Author Share Posted January 6, 2021 (edited) Just for reference here's the messy way I'm doing it with NetworkManager under Debian... Enable and start the NetworkManager-dispatcher.service: $ sudo systemctl enable NetworkManager-dispatcher.service $ sudo systemctl start NetworkManager-dispatcher.service Create a dispatcher script that contains your rules: $ sudo vim /etc/NetworkManager/dispatcher.d/wlp61s0-firewall.sh Note that wlp61s0 is the interface name I'm targeting for these rules: #!/usr/bin/env bash interface=$1 event=$2 if [[ $interface != "wlp61s0" ]] || [[ $event != "up" ]] then return 0 fi /sbin/iptables -F # Clear FW rules /sbin/iptables -A OUTPUT -o wlp61s0 -p tcp --dport 24800 -j DROP # Block synergy on wifi Give the file safer permissions: $ sudo chmod 755 /etc/NetworkManager/dispatcher.d/wlp61s0-firewall.sh Cycle the wifi interface down and then back up through Network Manager's UI, then check to see if the iptable rule was added: $ sudo iptables -S -P INPUT ACCEPT -P FORWARD ACCEPT -P OUTPUT ACCEPT -A OUTPUT -o wlp61s0 -p tcp -m tcp --dport 24800 -j DROP If you encounter some issues, check the status of the dispatcher service: $ sudo systemctl status NetworkManager-dispatcher.service Edited January 6, 2021 by Rubin Starset Link to post Share on other sites
HorsetoWater 0 Posted May 18, 2021 Share Posted May 18, 2021 same situation here... would be nice to specify default 'mode' of connecting the client to the server rather than having it default to wifi each time Link to post Share on other sites
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now