3 ## What is port forwarding?
5 Technically, port forwarding is the use of Network Address Translation
6 (NAT) to map an IP address and port number to another IP address and
7 port number. Typically you need this function to be able to expose a
8 service running our your local network (LAN) to the Internet (WAN)
9 which otherwise would be impossible because your LAN uses private,
10 non-routable IP addresses; for example, if you are trying to run a
11 gaming server or a Web page server from your home network.
15 Be aware that the use of port forwarding may create additional
16 security holes into your local network. The local system(s) and
17 service(s) you are exposing to the Internet must be free from security
18 vulnerabilities, or this may allow a remote attacker to infiltrate
23 * Log into the LuCi Web interface, which by default is at address https://192.168.10.1
25 * Select the `Network` >> `Firewall` menu.
27 ![alt text](images/librecmc-selecting-firewall-menu.png "Selecting the
30 * Select the `Port Forwards` tab.
32 ![alt text](images/librecmc-selecting-port-forwards-tab.png "Selecting the
35 * Under the `New Port forward` section, enter in the `Name` field a
36 brief description of the port forward, e.g., "HTTP server" for an
37 unencrypted Web page server.
39 * Select a protocol from the `Protocol` field. Most services you can
40 run will be using the TCP protocol, but you can select `TCP+UDP` if
43 * Usually, you will leave the `External zone` set to `wan`.
45 * Enter a port number in the `External port` field. Typically this
46 will be the usual port number expected for a particular
47 service. E.g., HTTP servers use port 80. You are free to use
48 non-standard ports, but your remote clients may need to use special
49 techniques to connect to the correct port.
51 * Usually, you will leave the `Internal zone` set to `lan`.
53 * Select an IP address in the `Internal IP address` drop down menu. If
54 your server is using DHCP, you should see its hostname appear in the
55 list. If your server is has it's private IP address set statically,
56 select the `Custom` option at the bottom of the list, and enter in
57 the correct IP address in the text field that appears. Note that if
58 your server is using DHCP, you should be sure LibreCMC has a static
59 lease created for it (TODO: link to Static Leases documentation).
61 * Enter a port number in the `Internal port` field. Typically this
62 will be the same as the external port, unless you have set your
63 server to work through a non-standard port, or you selected a
64 non-standard external port earlier.
66 ![alt text](images/librecmc-port-forwards-entering-parameters.png
67 "Entering parameters for port forwarding")
69 * Press the `Add` button to the right.
71 * Press the `Save & Apply` button at the bottom of the page.
73 ![alt text](images/librecmc-port-forwards-after-save-apply.png
74 "Port Forwards view after Save & Apply")
78 The official IANA port number list is available at
80 [https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml]
84 (TODO: option for configuring a range of ports simultaneously)