On Tue, May 08, 2001 at 09:20:12PM -0400, Richard Rose wrote:
> Has anyone used iptables to forward VNC through a firewall?
>
> Richard
>
I use the following script to set things up -
#! /bin/bash
#
# commonly used IPs and aliases
#
. /root/iptables/env
# Set up Port Forwarding for VNC
#
/sbin/iptables -t nat -A PREROUTING -p tcp -i ${EXTERNAL_INTERFACE} -s ${WORK_IP} --dport 5900 -j DNAT --to ${HOME_IP}:5900
/sbin/iptables -I block 1 -p tcp -i ${EXTERNAL_INTERFACE} -s ${WORK_IP} --dport 5900 -d ${HOME_IP} -j ACCEPT
--
Jonathan Freiermuth
jon@gnatfart.com
Attachment:
pgpvyZu_UTV8t.pgp
Description: PGP signature