Friday 25 November 2016

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"




No comments:

Post a Comment