[LUGOS] EXT IP v INT IP

rok lugos at s-je.sik.si
Mon Sep 9 14:21:14 CEST 2002


na.. tule je se en moj primer,s tem da jst laufam na interni masini vnc,
namest httpdja in mi dela bp.

---rc.vnc---
#!/bin/sh

in=192.168.0.15

case "$1" in
  start)
    iptables -t nat -A PREROUTING -i ppp0 -p tcp -m tcp --dport 5800 -j DNAT --to-destination $in
    iptables -t nat -A PREROUTING -i ppp0 -p tcp -m tcp --dport 5900 -j DNAT --to-destination $in
    ;;

   stop)
    iptables -t nat -D PREROUTING -i ppp0 -p tcp -m tcp --dport 5800 -j DNAT --to-destination $in
    iptables -t nat -D PREROUTING -i ppp0 -p tcp -m tcp --dport 5900 -j DNAT --to-destination $in
    ;;

  *)
    echo "Usage: $0 {start|stop}"
    exit 1
    ;;
esac

exit 0
---rc.vnc---






More information about the lugos-list mailing list