0

The context is I have my music on a single fanless PC that I would like to control through TightVNC on my main machine. To be absolutely anal about this, I would like to allow TCP port 5900 connections initiated from the main machine on this connection (a USB ethernet dongle) and nothing else at all.

What is the best way to set that up?

ip addr says:

4: enx0050b623f890: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000

link/ether 00:50:b6:23:f8:90 brd ff:ff:ff:ff:ff:ff

inet 192.168.2.2/29 brd 192.168.2.7 scope global enx0050b623f890
   valid_lft forever preferred_lft forever

Remote machine is on 192.168.2.3

Thanks in advance!

0
# Dont lock yourself out. Allow SSH access to this server
iptables -I INPUT -p tcp -s 192.168.2.3 --dport 22 -j ACCEPT
# Then allow VNC
iptables -I INPUT -p tcp -s 192.168.2.3 --dport 5900 -j ACCEPT
# And finally block anything else
iptables -A INPUT -p tcp ! -s 192.168.2.3 -j DROP

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.