Thursday, October 15, 2015

connect to corporate network from anywhere in internet through amazon ec2 instance

connect to a ubuntu server which resides inside a corporate network, which is more secured by corporate Firewall,  from anywhere in internet.

Assume you have a ubuntu 15.04 server located inside a corporate. corporate_user@corporate_server

if you want to connect to that corporate server from you home or from anywhere else, then you have to use a proxy server like amazon ec2
create a amazon ec2 instance server (named as $ws) with ubuntu 15.04 and enable port 22(enabled by default) and 2222.

now go and initiate a connection from you corporate_server
by typing

ssh -R 2222:localhost:22 -l ubuntu $ws
which will create a connection with ssh reverse port forwarding.

now connect your aws server ($ws) from anywhere and type
ssh -p 2222 corporate_user@localhost

that is nothing but your corporate_server

No comments: