How to turn Disable/Enable IP forwarding in Linux -

This article describes how to Disable or Enable an IP forwarding in Linux.
This is a companion discussion topic for the original entry at

Robson G. Barros

ok, how do I make my local server as webserver with my own domains, using nginx ? how do I setup the DNS to my websites be visible to others? thanks

putaro -> Robson G. Barros

Honestly, if you’re asking that question, you don’t want to do it.

Here’s the high-level explanation of what you need to do. Step-by-step is impossible to give.

DNS - it’s easier to use an outside service, like Amazon Route 53, to host your DNS setup. If you really want to do it yourself, you need a static IP address and then you need to set the DNS server for your domains to be that address. You need to have DNS running and available. You also need to have DNS passed through your firewall.

Web sites - If you have a static IP, it’s pretty easy. You publish the address in DNS. Be sure to have port 80 (http) open. If you want https, you’ll need to have port 443 open.

If you want more than one web site hosted, you can point multiple server names at the same IP address and use virtual hosts.

Guest → putaro

Honestly, if you’re asking that question, you don’t want to do it.

Thank you for the forwarding stuff; I always forget where the flag lives ;o)!

Thanks for the great and helpful article!

I noticed that this line doesn’t make sense:


Note that the sysctl command if the service isn’t currently running."

Also on my Debian bullseye box “$ systemctl status sysctl” doesn’t work. Instead sysctl is a command in /sbin.