Commits

Josh VanderLinden committed dcf637c

Documentation changes and fixing a bug in the autotunnel script

Comments (0)

Files changed (3)

 # Maintainer: Josh VanderLinden <arch@cloudlery.com>
 pkgname=autotunnel
-pkgver=0.3.1
+pkgver=0.3.2
 pkgrel=1
 pkgdesc="Easily create tunnels, reverse tunnels, and socks proxies"
 arch=('any')
 :Author: Josh VanderLinden <arch@cloudlery.com>
 :Date:   2012-10-19
 :Copyright: public domain
-:Version: 0.1
+:Version: 0.3.2
 :Manual section: 1
 :Manual group: system tools
 
-SYNOPSIS
+Synopsis
 ========
 
     autotunnel [-k] [profile]
 
-DESCRIPTION
+Description
 ===========
 
 This program is intended to make it easy to establish a single or multiple
 #. to launch and create the tunnels
 #. to kill an existing set of tunnels for a given profile
 
-OPTIONS
+Options
 =======
 
 [-k]                Kill the specified profile. If the profile is omitted, the
 determine if a profile is already running or not. If two profiles have the same
 `AUTOSSH_PORT`, only one of the two profiles may be running at one time.
 
-START TUNNELS AUTOMATICALLY AT BOOT
+Start Tunnels Automatically At Boot
 ===================================
 
 It's very important that you setup pre-shared key (PSK) authentication between
 went well, you should now be able to SSH into `remote_host` as `remote_user`
 without entering a password. If not, Google is your friend.
 
-SYSTEMD
+systemd
 -------
 
 You have two options for starting the tunnels automatically at boot time. The
 
     systemctl enable autotunnel@profile
 
-SUPERVISORD
+supervisord
 -----------
 
 If you're using ``supervisord``, you should be able to just copy or symlink the
 
     command=/usr/local/bin/autotunnel specific-profile
 
-ABOUT TUNNELING
+About Tunneling
 ===============
 
 Tunnels are very powerful. They allow you to access remote systems by using
 
 The profile template allows you to configure both of these types of tunnels.
 
-NORMAL TUNNELS
+Normal Tunnels
 --------------
 
 You can configure your normal tunnels by specifying them in the ``TUNNELS``
       '59000:localhost:5900'
     )
 
-REVERSE TUNNELS
+Reverse Tunnels
 ---------------
 
 Reverse tunnels allow you to access ports on your local machine by accessing
       '2222:localhost:22'
     )
 
-SOCKS PROXIES
+Slightly More Advanced Tunnels
+------------------------------
+
+There are a lot of neat things you can do with tunnels. I will leave it up to
+you to Google the more advanced things, but I would just like to mention
+something. You may have noticed that all of the above examples have `localhost`
+in them. This is not absolutely necessary--you can be the hostname or IP of
+another system on the network.
+
+For example, say I have 3 PCs. PC A is my machine at work. PC B is my laptop at
+home. PC C is my desktop at home. My home router is configured to forward all
+traffic to PC B, but I want to access PC C from PC A.
+
+To do this, I can setup a normal tunnel to PC B as such::
+
+    2222:pc_c:22
+
+Then I can SSH into PC C from PC A by issuing a command like::
+
+    ssh pc_c_user@localhost -p 2222
+
+SOCKS Proxies
 =============
 
 SOCKS proxies are a way for you to proxy network traffic through an SSH
 get_config() {
   CONFIG=$1
   if [[ -z ${CONFIG} ]]; then
-    CONFIG=/etc/autotunnel/default.conf
+    CONFIG=default
   fi
 
   CFGFILE=/etc/autotunnel.d/${CONFIG}.conf
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.