Creative port forwarding in FreeBSD (multivnc)

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

Dette indlæg blev udgivet i FreeBSD, Knowledge Base, Networking, Old Base. Bogmærk permalinket.

Skriv et svar