home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 June / ccd0605.iso / Software / Shareware / Comunicatii / nat32 / script / VPNS < prev    next >
Text File  |  2004-06-07  |  439b  |  22 lines

  1. #!tcl 
  2.  
  3. # VPN Server mappings
  4. #
  5.  
  6. if {$argc != 2 } {
  7.     error {Usage: VPNS IPaddress|off Port}
  8. }
  9.  
  10. set addr [lindex $argv 0]
  11. set port [lindex $argv 1]
  12.  
  13. if {$addr == "off"} { 
  14.     exec "ppmaps delete tcp $port"
  15.     exec "amaps delete $port"
  16.     exec "gmaps delete $addr \$SRCIP"
  17. } else { 
  18.     exec "ppmap add tcp $port $addr 1723"
  19.     exec "amap add $port \"gmap add $addr \$SRCIP\" \"gmap delete $addr \$SRCIP\""
  20.