Make it available from the Internet: Port Forwarding - OpenWrt

Diese Seite gibt es auch in Deutsch

Port forwarding can be used to publish computers in your own network on the Internet and thus make them accessible from the Internet. Anyone who uses a WLAN router for their home network to connect to the Internet has most likely set up a NAT (Network Address Translation) on it, either consciously or unconsciously. This means that the internal devices use private IP addresses and connect to the Internet via a common public IP address. To enable a connection from the Internet to a specific computer in the private LAN, a so-called port forwarding can be set up. But first, let's take a brief look at how a connection to the Internet is actually established via a router:

Connection to the Internet via a router

Private IP addresses are e.g. 192.168.x.x or 172.16.x.x or 10.x.x.x. In this example we use 192.168.0.1 - 254 as private network.

The computers connect to the Internet via the router (default gateway) and share a public IP address (Public IP)

address of the own network can be found out in Windows via the command prompt.

To do this, enter the command ipconfig:

The IPv4 address in the output is the address of the computer, the default gateway is the address of the router, see also Network Commands.

Port forwarding: connection from the Internet to a computer in the internal network

a corresponding web service must be active on the computer to be accessed, this can be tested with localhost, see calling localhost.

Set port forwarding

Exemplary also for other routers, a port forwarding can be set in the free router firmware openWRT as follows: So in the browser to the IP address of the router (gateway, in the example http://192.168.0.1).
Firewall, Port Forwards, Add:

As in the schematic example: port 80 from the external interface should connect to the internal IP address 192.168.0.3 port 80.

OpenWRT is a router firmware for various routers, see: Alternative Router Firmware: OpenWrt and no longer DD-WRT

What is the public IP of the Internet access?

The call from the Internet is made via the public IP address of the Internet connection.

After the public IP address of your internet access is used to call this page, we can show it here:
The current IP address of your Internet access is:

(see above pictures: "Public IP Internet access" )

positive Bewertung({{pro_count}})
Rate Post:
{{percentage}} % positive
negative Bewertung({{con_count}})

THANK YOU for your review!

Publication: 2022-08-08 from Bernhard


Top articles in this section


Running Docker Mailserver yourself | a field report
With the help of a suitable Docker image, it is relatively easy to run a mail server yourself. I originally used the integrated mail server of the Host Europe vServer (Plesk) and came across a very simple Docker container while looking for a replacement. The lightweight container provides a mail server without a graphical management interface, but can be managed with a few simple commands. Any email client can be used to send and receive the mails, for this POP3 or IMAP is offered for receiving...

Nextcloud SSL - letsencrypt https | Docker
To synchronize contacts, appointments, and photos of my NAS, I tested Nextcloud and thus turned my back on other cloud providers for my private data. Thanks to Docker, the installation is easier and more flexible than ever, allowing Nextcloud to run on almost any hardware.

Nginx-LetsEncrypt reverse proxy in practice
In addition to Traefk, the Nginx Proxy Automation project can be used to run multiple web services with corresponding SSL certificates on one server . The setup involves several Docker containers that together provide an Nginx reverse proxy including certificate management and SSL offloading. Once the containers are started via Docker Compose, they take care of serving multiple websites over a common IP and its certificate management: for issuing certificates for new containers and renewing the...

Questions / Comments


By continuing to browse the site, you agree to our use of cookies. More Details