Unifix knowledge database - The original one

Dashboard - News - Search - List - About - Admin


Creative port forwarding in FreeBSD (multivnc)

Author:mike - Tue Sep 14 17:49:27 2004

We needed some dynamic forwarding in FreeBSD

cd /usr/ports/sysutils/socket
make install

We needed to forward some vnc

vbcafe# echo vnc 5900/tcp >> /etc/services
vbcafe# echo vnc1 5901/tcp >> /etc/services
vbcafe# echo vnc2 5902/tcp >> /etc/services
vbcafe# echo vnc3 5903/tcp >> /etc/services
vbcafe# echo vnc4 5904/tcp >> /etc/services
vbcafe# echo vnc5 5905/tcp >> /etc/services
vbcafe# echo vnc6 5906/tcp >> /etc/services
...and so on

Or for the lazy ones:
perl -e 'for ($i=0; $i<50; $i++) {  print "vnc$i ".($i+5900)."/tcp\n";}' >> /etc/services

vnc1    stream  tcp     nowait  nobody  /usr/local/bin/socket socket 10.1.1.1 5900
Copyright(c) Unifix.org 2002-2011


Dashboard - News - Search - List - About - Admin
 
Powered by Mikjaer Consulting Solutions - Hosted by Specialhosting.dk