opsdisk / the_cyber_plumbers_handbook

Free copy of The Cyber Plumber's Handbook - The definitive guide to Secure Shell (SSH) tunneling, port redirection, and bending traffic like a boss.
https://opsdisk.gumroad.com/l/cphlab
Other
2.54k stars 163 forks source link

hostnames vs. IPs #4

Open zenfish opened 2 years ago

zenfish commented 2 years ago

You use names in the text, but IPs in the actual commands... for instance, you write: "This sets up a remote port forward on JUMPBOX1’s 127.0.0.1 interface on TCP 5000", then show this as:

ssh -p 22 nemo@192.168.1.220 -R 127.0.0.1:5000:127.0.0.1:5555

However, using ports in numbers and hosts in text allows you to immediately pick out which is which, esp. in more complex lines... this seems far more readable... and eliminating the private IP space it makes it seem more real (I mean... who uses an IP vs. a FQDN/SSH host entry?)

ssh -p 22 nemo@jumpbox1 -R localhost:5000:localhost:5555

All IMHO, of course.

opsdisk commented 2 years ago

Hi @zenfish - Again, appreciate the feedback along with https://github.com/opsdisk/the_cyber_plumbers_handbook/issues/5.

IIRC, it was supposed to be a generic name describing the box and not technically a DNS host name.

As for the use of private IP space, I framed it coming from a pentesting background, where you may be inside a network with RFC1918 IPs everywhere and are more IP focused, instead of FQDN focused like a network admin might be.