If you want to learn more about the power of iptables checkout this video here iptables Demystified - Port Redirection and Forwarding HTTP Traffic to another machine (part 1) kzbin.info/www/bejne/hHLHe6KgraqBe7c
@davidjdailey4 жыл бұрын
Thank you. After searching about 15 written tutorials, I found your video. The written tutorials don't seem to address something simple like this. I wanted to use non-standard ports that are exposed to the public, and then forward to default ports in my server.
@hnasr4 жыл бұрын
Glad it worked Dave!
@debasismandal19244 жыл бұрын
This channel is like a hidden gem! I'm glad I found this.
@DrSTAHP3 жыл бұрын
Very nice explanation! It was actually easier than I expected it to be.
@nicozica4 жыл бұрын
Thanks for the magical forwarding command!! I've been reading a lot to launch my home server behind a CG-NAT connection. I finally made it with that command! Using a Lightsail instance with OpenVPN and a virtual machine I can now run my home serving for testing my web apps.
@hnasr4 жыл бұрын
nicozica so awesome! Thanks for sharing glad it works
@nerdion19113 жыл бұрын
You are a saviour! No one explained me this shit on the fucking internet, people running on sudo n shit Thanks man 😅 You saved my brain
@jedi_v3 жыл бұрын
Thank you Hussein, really nice way of explaining you've got. Keep going !
@blazed-space Жыл бұрын
Dude, these videos are amazing! Thank you 🙏 for this great content!
@nafasm4 жыл бұрын
Thank you for your tutorial Hussein
@risardirisardi45564 жыл бұрын
Amazing Hussein!, thank your for the tutorial
@hnasr4 жыл бұрын
Your welcome Risardi!! Glad you enjoyed this video :) cheers
@Aemilindore4 жыл бұрын
With this simply we can get a cheap digital ocean instance and fwd the Nextcloud traffic via WireGuard to our powerful home server. It’s amazing.
@AnasHmamouch3 жыл бұрын
this channel is a gem thank you so much!
@TheDEMMX2 жыл бұрын
Hussein, why do we need to do this in the first place? Why not let users access our app on port 8080? Why 80?
@jordybayo93742 жыл бұрын
if you don't know the ip addr of the machine, just do this > sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080 # 8080 -> 8080
@rne12232 жыл бұрын
That worked...thanks.
@KrizyzZ004 жыл бұрын
Thank you for your awesome content i enjoy each video of yours love your accent and the way you explain things love from israel
@hnasr4 жыл бұрын
Thanks for your comment! Your the first who likes my accent haha cheers and have a great weekend
@keshavbadhekar3 жыл бұрын
Hi Hussein.. I have follow all this steps you have mentioned in the video on my EC2 instance on AWS... I already ensured that port forwarding is enabled.....but still request is not forwarding to port 8080 from 80....please help
@Timska5 жыл бұрын
Good videos! informative and easy to follow
@hnasr5 жыл бұрын
timska thank you 🙏
@synchronizingsynchronize30663 жыл бұрын
well explained thank you !
@rezzpa5 жыл бұрын
works like a charm, thanks man
@hnasr5 жыл бұрын
Glad I could help!! Thanks for commenting
@ViperrKsa4 жыл бұрын
if my university blocks range of ports does this actually help? I am not a software engineer but I am trying to setup my pivpn the best way for me.
@ahangk3 жыл бұрын
can we use this method to redirect port 443 to another port? I tried but it didn't work.
@arunteltia78884 жыл бұрын
sir i dont get the need of this why are we doing this cant we just use reverse proxy that will redirect us to port 80 and if you see my question can you tell me are we exposing our 8080 port to 80 port I am getting confuse It will mean a lot if you tell me the doubt New to networking kid
@hnasr4 жыл бұрын
You don't have to use it, its just in cases where it is not possible to listen on port 80 for security reason (any thing less than 1024 must run with high permissions) .. so you use iptables instaed
@arunteltia78884 жыл бұрын
@@hnasr sir i was not expecting your answer that fast Thank you very much Any thing you will suggest me other that your network engineeriing video for network Thank uou once again Heheheh i am being selfish🤗🤩
@ahmedboutaraa87713 жыл бұрын
@@arunteltia7888 sorry if this will not help you but this is the best place to learn about all the nitty-gritty of backend engineering,
@arunteltia78883 жыл бұрын
@@ahmedboutaraa8771 yes I completely agree with you I learned so much from this channel in 3 months I am glad I found this channel
@Yours--Truly4 жыл бұрын
With this iptables setup, your server would be online too?
@MrZerged4 жыл бұрын
Hey, sorry maybe I misunderstood, but this example only works if you can send your request directly to the machine. How is it configured if the router is port forwarding back? Or rather how does it work on 80 from a public side request?
@hnasr4 жыл бұрын
Hey! if you want to port forwards the router to an internal host than you can simply provide do that like here kzbin.info/www/bejne/b2PFXp2gd7qFodk
@lopo80003 жыл бұрын
can u help me i'm building my own infrastructure pointing to my own home server, does anyone know how to open ports to the internet on a 02 router?, i only get http port 80 from my server when i open port to the internet but no connection through https por 443 ? , i need to open my ubuntu server from proxmox to the internet and https need to work but i run into problems
@ArjayShortClip4 жыл бұрын
Hi Thanks for this awesome tutorial I was wondering if you can help me how to display my raspberry pi iptables in my nodejs api? thanks in advance
@hnasr4 жыл бұрын
Sure! The idea is to execute a command on linux from nodejs and get the output and iptables is just a command. Check the answer here hope that helps. Careful im not sure if iptables required root, if it does than nodejs will need to be root as well which is not a good idea stackoverflow.com/questions/12941083/execute-and-get-the-output-of-a-shell-command-in-node-js