20140304 iptables configuration for vnc server - plembo/onemoretech GitHub Wiki

title: iptables configuration for vnc server link: https://onemoretech.wordpress.com/2014/03/04/iptables-configuration-for-vnc-server/ author: phil2nc description: post_id: 7066 created: 2014/03/04 16:02:45 created_gmt: 2014/03/04 21:02:45 comment_status: closed post_name: iptables-configuration-for-vnc-server status: publish post_type: post

iptables configuration for vnc server

If you're running a VNC (Virtual Network Computing) server like TigerVNC behind a host firewall, the following may be of interest to you. Here's the iptables syntax to allow clients to connect to a VNC server on a firewalled host:

-A INPUT -p tcp -m tcp --dport 5900:5904 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 5800:5804 -j ACCEPT

This opens TCP ports across the ranges 5900 to 5904 and 5800 to 5804. That would allow up to 4 simultaneous VNC sessions, which should be more than enough for servers. If you're using VNC to give users access to remote home directories on the server, you'll probably want to increase that range.

Copyright 2004-2019 Phil Lembo