Friday, 25 November 2016

SSH Tunnel



The easiest way to create a socks compliant ssh tunnel:

From the computer inside the network:

ssh -D [port number] -fN user@server
Then you can configure the application or service on the machine to access the remote server via the SSH tunnel and port configured.

e.g.


ssh -D 3333 -fN user@server.com

bfgminer -S opencl:auto --socks-proxy localhost:3333 --debug



Apple OS X - command line network commands




How to show the routing table:

netstat -nr

How to add a route:

sudo route -n add [ip address]/[subnet] [gateway]
e.g.

$ sudo route -n add 10.0.0.0/24 172.16.0.1

List open files (Determine what target IP and application/process is connected to)

$ lsof -i
e.g. To determine what IP a Citrix session is connecting to:
$ lsof -i | grep -E "Citrix"