How to get the external public IP via ssh port forwarding

  • ssh -T -L 7080:ipecho.net:80 <production machine alias> : there is a server listening on port 7080 locally forwarding the traffic to ipecho.net:80.
  • curl -H “host:ipecho.net” http://localhost:7080/plain; echo
  • “ipecho.net can be replaced with ifconfig.me etc.
Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s