Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| docs:guide-user:network:wan:access.modem.through.nat [2021/03/04 13:24] – formatting vgaetera | docs: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 1: | Line 1: | ||
| - | ====== Accessing | + | ====== Accessing |
| {{section> | {{section> | ||
| ===== Introduction ===== | ===== Introduction ===== | ||
| - | DSL/DOCSIS modems can operate in the bridge mode and provide internet | + | * This how-to describes |
| - | To access | + | * It helps to reach the administrative interface |
| - | Sometimes you additionally need the correct username | + | * The prerequisite is to know the modem' |
| - | ===== Web interface | + | ===== Goals ===== |
| - | Navigate to **LuCI -> Network -> Interfaces -> WAN**, fill in a name in the " | + | * Access the modem operating |
| - | {{: | + | ===== Web interface instructions ===== |
| + | Assuming your modem's IP address is '' | ||
| - | Within the appearing alias section, fill out the IP address | + | - Navigate to **LuCI -> Network -> Interfaces**. |
| - | In my case the modem is reachable via 192.168.100.1, so I've choosen 192.168.100.10 as alias address. | + | - Click **Add new interface...** |
| - | After a while you should see the alias prefix appear in the interface | + | * Name: '' |
| + | * Protocol: Static address | ||
| + | * Interface: '' | ||
| + | - Click **Create interface**. | ||
| + | - On the **General Settings** tab specify: | ||
| + | * IPv4 address: '' | ||
| + | * IPv4 netmask: '' | ||
| + | - On the **Firewall Settings** tab assign | ||
| + | * Create / Assign firewall-zone: | ||
| + | - Click **Save**, then **Save & Apply**. | ||
| - | {{: | + | At this point the modem should be reachable from any host in the LAN. |
| - | Navigate to **LuCI -> Network -> Firewall** and open the WAN zone properties (framed red). | ||
| - | {{: | + | === NOTE === |
| - | Switch to the " | + | If you are using the BanIP package, make sure to add the IP to the allowlist. Ex. '' |
| - | Hit "Save & Apply" | + | |
| - | {{: | ||
| - | At this point the modem should be reachable from any host in the LAN. | + | ===== Command-line instructions ===== |
| + | Assuming your modem's IP address is '' | ||
| - | ===== Command-line interface ===== | + | Set up a static WAN [[docs: |
| - | Assuming that your modem address is '' | + | |
| <code bash> | <code bash> | ||
| - | # Configure firewall | ||
| - | uci add_list firewall.@zone[1].network=" | ||
| - | uci commit firewall | ||
| - | / | ||
| - | |||
| # Configure network | # Configure network | ||
| - | uci -q delete | + | uci -q del network.modem |
| uci set network.modem=" | uci set network.modem=" | ||
| - | uci set network.modem.ifname=" | ||
| uci set network.modem.proto=" | uci set network.modem.proto=" | ||
| + | uci set network.modem.device=" | ||
| uci set network.modem.ipaddr=" | uci set network.modem.ipaddr=" | ||
| uci set network.modem.netmask=" | uci set network.modem.netmask=" | ||
| uci commit network | uci commit network | ||
| - | /etc/init.d/network restart | + | service network restart |
| + | |||
| + | # Configure firewall | ||
| + | uci del_list firewall.@zone[1].network=" | ||
| + | uci add_list firewall.@zone[1].network=" | ||
| + | uci commit firewall | ||
| + | service firewall | ||
| </ | </ | ||
| - | Make sure the modem subnet doesn' | + | Make sure the modem subnet doesn' |
| <code bash> | <code bash> | ||
| Line 55: | Line 63: | ||
| uci set network.lan.ipaddr=" | uci set network.lan.ipaddr=" | ||
| uci commit network | uci commit network | ||
| - | / | + | service |
| </ | </ | ||
| - | In some cases you may need to disable IP masquerading or use the physical | + | If the WAN L2 device |
| <code bash> | <code bash> | ||
| - | # Configure firewall | + | # Fetch WAN L2 device |
| - | uci set firewall.@zone[1].masq_dest=" | + | . /lib/functions/network.sh |
| - | uci commit firewall | + | network_flush_cache |
| - | /etc/init.d/firewall restart | + | network_find_wan NET_IF |
| + | network_get_physdev NET_L2D " | ||
| # Configure network | # Configure network | ||
| - | uci set network.modem.ifname="eth0.2:1" | + | uci set network.modem.device="${NET_L2D}" |
| uci commit network | uci commit network | ||
| - | / | + | service |
| </ | </ | ||