Загрузка страницы

Port forwarding with NAT and iptables (transparent proxying) - “Run” your webapp on port 80

💻 More software engineering videos https://www.youtube.com/playlist?list=PLQnljOFTspQXOkIpdwjsMlVqkIffdqZ2K
We have written countless web apps on this channel, but most of them pretty much always run port 8080 or 3000 or some ugly ports. In this video we will learn how to make our app run on port 80 or at least seem to be running on port 80.

Running your web app whether nodejs or python on port 80 require root access which is always a bad idea. So better way is to use a reverse proxy like nginx or do DNAT like what we will do in this video.

*** Forward packet from one port to another
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 192.168.254.47:8080

*** To clean the NAT table
sudo iptables -t nat -F

*** To Masquerade in case you want to forward to another ip address
sudo iptables -t nat -A POSTROUTING -p tcp --dport 80 -j MASQUERADE
0:00 Intro
2:00 Port forward routing
2:20 nginx
3:00 NAT


Stay Awesome!
Hussein

Видео Port forwarding with NAT and iptables (transparent proxying) - “Run” your webapp on port 80 канала Hussein Nasser
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
6 июля 2019 г. 20:39:18
00:13:54
Яндекс.Метрика