0

I have a web server in AWS EC2 for example with http://11.22.33.44 listening to port 80. I would like to do something like port forwarding such as if I'm browsing the website IP from my home network using http://11.22.33.44:8001, it forward/translate the traffic to port 80 in my AWS server and browse my web site.

How can I do it in AWS? I just need to apply this rule for any source traffice from my home network, but in other network environment, it should still browse to http://11.22.33.44 port 80.

  • To be clear, are you asking for port 8001 to only be accessible from your local network (reject all other traffic) or are you asking for port 8001 to point to something different when accessed inside your local network? – Philip Couling Mar 25 '19 at 10:14
  • hi @PhilipCouling, to make it clear, i have a AWS web server (centos 7) with IP 11.22.33.44:80 , I have another server at Google Cloud with public IP 55.66.77.88. My scenario is if I'm browsing 11.22.33.44:8001 from my Google Cloud server, I'm able to view the web content just like 11.22.33.44:80, I think it's something called port forwarding if I'm not mistaken. – Kyc Kyc Mar 26 '19 at 3:05
0

You have to set up a web server like Apache or Nginx. After successfully setting up you can write a rule for forwarding you port on local IP. Here are some good reference for setting up web server:-

Apache=> https://www.digitalocean.com/community/tutorials/how-to-install-the-apache-web-server-on-ubuntu-18-04-quickstart

Nginx=> https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-18-04-quickstart

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.