Skip to content

jag-ermeister/proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ssh -i ~/.ssh/ubuntu_box_key.pem [email protected]

Setting up the proxy and tunnel using EC2 and OpenSSH:

  1. Configure inbound connection rules for the security group associated with the EC2 instance to allow all traffic for the SSH (20), HTTP (80), and HTTPS (443) ports. Also add a Custom TCP Rule for port 8080 to allow all incoming traffic.
  2. Outbound connection rules should allow all traffic.
  3. Add this to /etc/ssh/sshd_config:
AllowTcpForwarding yes
GatewayPorts yes
  1. Setup the ssh tunnel between port 8080 on the remote server and port 5050 on the local machine: ssh -v -i ~/.ssh/ubuntu_box_key.pem -R 8080:localhost:5050 [email protected]
  2. To test the connection, setup netcat to listen on port 5050: netcat -l -p 5050 And then send some text via TCP to port 8080 of the remote server: echo “Please work, please work...” | nc -v 18.236.68.125 8080 The terminal with the netcat listener will receive and log text when the connection is successful.
  3. Once the above test passes, fire up the proxy with node app.js and fire a request off to http://18.236.68.125:8080.

Setting up the proxy and tunnel using ngrok

  1. Start proxy server: node app.js
  2. Start ssh tunnel: ngrok http 5050

Helpful Links

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published