eBook Library Server
Port Forwards
The following IPv4 connections from the Internet to the router are forwarded to the HTTP server.
Using the OpenWRT web GUI
Using the OpenWRT web GUI, go to Network - Firewall - Port Forwards and add a new port forward:
Name |
HTTP Port Forwarding |
Protocol |
TCP |
Source Zone |
wan |
Source MAC address |
|
Source IP address |
any |
Source port |
any |
External IP address |
any |
External port |
80 |
Internal zone |
lan |
Internal IP address |
192.0.2.30 |
Internal port |
443 |
Enable NAT loopback |
checked |
Extra arguments |
Name |
HTTPS Port Forwarding |
Protocol |
TCP |
Source Zone |
wan |
Source MAC address |
|
Source IP address |
any |
Source port |
any |
External IP address |
any |
External port |
443 |
Internal zone |
lan |
Internal IP address |
192.0.2.30 |
Internal port |
443 |
Enable NAT loopback |
checked |
Extra arguments |
Using the firewall configuration file
/etc/config/firewall
on the OpenWRT router:
config redirect
option target 'DNAT'
option src 'wan'
option dest 'lan'
option proto 'tcp'
option src_dport '80'
option dest_port '80'
option name 'HTTP'
option dest_ip '192.0.2.30'
# HTTPS Port Forwarding
config redirect
option target 'DNAT'
option src 'wan'
option dest 'lan'
option proto 'tcp'
option src_dport '443'
option dest_port '443'
option name 'HTTPS'
option dest_ip '192.0.2.30'