Redirecting to another port using iptables

One of the things that I hate about nodejs is that I will have to run it as root if I want to use the port 80, but yesterday while I was reviewing a book called Mastering Web Application Development with Express and one of the solutions which he talked about so that you dont need to use the root user is to redirect the ports using iptable , so this is what you have to do :

remember to change eth0 to the one you are connecting to, in my vagrant it was eth1

And since iptable does not save anything as permanent, you have to do small work (read more about it here)

And we are done, no need to use the root account any more šŸ˜‰

 

PS: This article will work with ubuntu < 16.04 , because serviceĀ does not work with ubuntu 16.04 as I know, but not 100% sure.

Filed under: Linux, Other

1 Comment


Add a Comment

Your email address will not be published. Required fields are marked *

Comment *

Name *
Email *
Website