Router Configuration

We need to set up our router to make sure it's ready to send and receive traffic through the World Wide Web.

Accessing our Router Dashboard

Connecting our web server to the internet will require gaining access to our router's administrative dashboard.  We can find our routers address by using the command:

ip -o route show | grep default | perl -nle 'if ( /via\s+(\S+)/ ) {print $1}'

image.png

Going to our web browser, we can enter the IP address returned by our command:

192.168.68.1

VirtualBox_Debian_19_02_2025_21_55_19.png

Some routers may require an app to access all configuration settings.

Sign in.  Default username and password.

Securing the Administrator Account

We need to make sure that our router uses a secure password.

Reserving an IP Address

We've been requesting the same IP for our computer from the router, but this doesn't stop another computer on the network from requesting the same IP address and causing a conduct.  It's always best for security and stability to reserve the IP address for our server at the router level.

DHCP address reservation for common routers 

Connecting Your Personal Server to the Internet

We will need to set our router to forward any requests it gets through port 80 and port 443 to our server.  This is how we'll connect our server to the Internet to accept request for web traffic. Web browser traffic uses port 80 for insecure HTTP requests as well as port 443 for secure HTTPS requests.

Even though port 80 is used for insecure traffic, our server is configured to forward all traffic from this port to 443 to create a secure connection.  Our server will not allow insecure connections.  If we close port 80, the browser will not know how to respond if we go to a website without the protocol.  Many web browsers allow insecure web site connections by default and will default to checking for the website using http.  If we have the http port closed, the traffic can't be channeled into a secure connection.

Find port forwarding  or nat forwarding.

Forward port to our servers IP Address

openvpn server port

https://portforward.com/router.htm