ssh local port forwarding for testing LinkedIn

The Problem

How to reproduce the issue from a dev machine that has SSH access to the production cluster. 

  • Python code that invokes the LinkedIn API.
  • On dev machine, run ” sudo ssh -L 443:api.linkedin.com:443 production_id@production_ip”, this will route the localhost:443 to api.linkedin.com:443 via a target production machine.
  • DNS spoofing such as dnsmasq:

dnsmasq.conf:addn-hosts=/etc/dnsmasq.hosts

dnsmasq.hosts: “127.0.0.1 api.linkedin.com”

sudo service dnsmaq restart

Advertisements
This entry was posted in ssh. 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