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
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
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
![iptables Demystified - Port Redirection and Forwarding HTTP Traffic to another machine (part 1)](https://i.ytimg.com/vi/NAdJojxENEU/default.jpg)
![Network Address Translation - NAT Explained](https://i.ytimg.com/vi/RG97rvw1eUo/default.jpg)
![Citrix Netscaler ADC Traffic Management and Load balancing Virtual Servers Configuration](https://i.ytimg.com/vi/WrMW7CD4_h0/default.jpg)
![](https://i.ytimg.com/vi/T5fGvtiqUi8/default.jpg)
![TCP vs UDP Crash Course](https://i.ytimg.com/vi/qqRYkcta6IE/default.jpg)
![Public IP vs. Private IP and Port Forwarding (Explained by Example)](https://i.ytimg.com/vi/92b-jjBURkw/default.jpg)
![Top 10 Linux Job Interview Questions](https://i.ytimg.com/vi/l0QGLMwR-lY/default.jpg)
![NAT - SNAT, DNAT, PAT & Port Forwarding](https://i.ytimg.com/vi/wg8Hosr20yw/default.jpg)
![Access Your Self Hosted Services WITHOUT Port Forwarding](https://i.ytimg.com/vi/VrV0udRUi8A/default.jpg)
![Consistent Hashing | The Backend Engineering Show](https://i.ytimg.com/vi/p6wwj0ozifw/default.jpg)
![10 FrontEnd Performance Tips To Improve Your Application (Any Programming Language)](https://i.ytimg.com/vi/mnuYVi5pcfQ/default.jpg)
![Introduction to IPTables](https://i.ytimg.com/vi/XKfhOQWrUVw/default.jpg)
![Proxy vs reverse proxy vs load balancer (2020) | Explained with real life examples](https://i.ytimg.com/vi/MiqrArNSxSM/default.jpg)
![PiVPN : How to Run a VPN Server on a $35 Raspberry Pi!](https://i.ytimg.com/vi/15VjDVCISj0/default.jpg)
![Multithreading in Javascript Using Worker Threads](https://i.ytimg.com/vi/aDqGIhl7cdo/default.jpg)
![Creating an SRT Connection Between a TriCaster and vMix](https://i.ytimg.com/vi/0gKA7ZYuekY/default.jpg)
![Port Forwarding Explained](https://i.ytimg.com/vi/2G1ueMDgwxw/default.jpg)
![IPTABLES [PART-1] : "UNDERSTANDING THE CONCEPT"](https://i.ytimg.com/vi/vbhr4csDeI4/default.jpg)
![SSH Tunneling - Local & Remote Port Forwarding (by Example)](https://i.ytimg.com/vi/N8f5zv9UUMI/default.jpg)
![How public WIFI can be sniffed?](https://i.ytimg.com/vi/ECukPUUK_74/default.jpg)