Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
docs:guide-user:network:wan:access.modem.through.nat [2022/01/05 09:06] – [Web interface instructions] Improve LuCI firewall zone instructions. bill888docs:guide-user:network:wan:access.modem.through.nat [2024/10/30 00:44] – [Web interface instructions] Easier to assign the "modem" interface to the "wan" zone. lastedit
Line 22: Line 22:
     * IPv4 address: ''192.168.100.2''     * IPv4 address: ''192.168.100.2''
     * IPv4 netmask: ''255.255.255.0''     * IPv4 netmask: ''255.255.255.0''
-  - Navigate to **LuCI -> Network -> Firewall**. +  - On the **Firewall Settings** tab assign the ''modem'' interface to the ''wan'' zone: 
-  - Under **General Settings** tab, scroll down to **Zones**. +    * Create / Assign firewall-zone: ''wan''
-  - Edit the ''wan'' zone. +
-    * Open ''Covered Networks'' list box. +
-    * Add ''modem''+
   - Click **Save**, then **Save & Apply**.   - Click **Save**, then **Save & Apply**.
  
 At this point the modem should be reachable from any host in the LAN. At this point the modem should be reachable from any host in the LAN.
 +
 +
 +=== NOTE ===
 +
 +If you are using the BanIP package, make sure to add the IP to the allowlist. Ex. ''192.168.100.0/24''
 +
  
 ===== Command-line instructions ===== ===== Command-line instructions =====
Line 37: Line 40:
  
 <code bash> <code bash>
-# Configure firewall 
-uci add_list firewall.@zone[1].network="modem" 
-uci commit firewall 
-/etc/init.d/firewall restart 
- 
 # Configure network # Configure network
-uci -q delete network.modem+uci -q del network.modem
 uci set network.modem="interface" uci set network.modem="interface"
-uci set network.modem.device="@wan" 
 uci set network.modem.proto="static" uci set network.modem.proto="static"
 +uci set network.modem.device="@wan"
 uci set network.modem.ipaddr="192.168.100.2" uci set network.modem.ipaddr="192.168.100.2"
 uci set network.modem.netmask="255.255.255.0" uci set network.modem.netmask="255.255.255.0"
 uci commit network uci commit network
-/etc/init.d/network restart+service network restart 
 + 
 +# Configure firewall 
 +uci del_list firewall.@zone[1].network="modem" 
 +uci add_list firewall.@zone[1].network="modem" 
 +uci commit firewall 
 +service firewall restart
 </code> </code>
  
Line 59: Line 63:
 uci set network.lan.ipaddr="192.168.2.1" uci set network.lan.ipaddr="192.168.2.1"
 uci commit network uci commit network
-/etc/init.d/network restart+service network restart
 </code> </code>
  
Line 74: Line 78:
 uci set network.modem.device="${NET_L2D}" uci set network.modem.device="${NET_L2D}"
 uci commit network uci commit network
-/etc/init.d/network restart+service network restart
 </code> </code>
  
  • Last modified: 2024/10/30 06:14
  • by lastedit