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/08 10:52] – [Introduction] 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 3: | Line 3: | ||
| ===== 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' |
| ===== Goals ===== | ===== Goals ===== | ||
| * Access the modem operating in the bridge mode through the router. | * Access the modem operating in the bridge mode through the router. | ||
| - | ===== Web interface ===== | + | ===== Web interface |
| - | Assuming your modem' | + | Assuming your modem' |
| - | Navigate to **LuCI -> Network -> Interfaces -> Add new interface...** and specify: | + | - Navigate to **LuCI -> Network -> Interfaces**. |
| - | * Name: '' | + | |
| - | * Protocol: Static address | + | * Name: '' |
| - | * Interface: | + | * Protocol: Static address |
| + | * Interface: '' | ||
| + | - Click **Create interface**. | ||
| + | - On the **General Settings** tab specify: | ||
| + | * IPv4 address: '' | ||
| + | * IPv4 netmask: '' | ||
| + | - On the **Firewall Settings** tab assign the '' | ||
| + | * Create / Assign firewall-zone: | ||
| + | - Click **Save**, then **Save & Apply**. | ||
| - | Then click **Create interface**. | + | At this point the modem should be reachable from any host in the LAN. |
| - | On the **General Settings** tab specify: | ||
| - | * IPv4 address: '' | ||
| - | * IPv4 netmask: '' | ||
| - | On the **Firewall Settings** tab specify: | + | === NOTE === |
| - | * Create / Assign firewall-zone: | + | |
| - | Then click **Save & Apply**. | + | If you are using the BanIP package, make sure to add the IP to the allowlist. Ex. '' |
| - | At this point the modem should be reachable from any host in the LAN. | ||
| - | ===== Command-line | + | ===== Command-line |
| - | Assuming your modem' | + | Assuming your modem' |
| Set up a static WAN [[docs: | Set up a static WAN [[docs: | ||
| <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 | ||
| </ | </ | ||
| Line 59: | 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, | + | 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 |
| </ | </ | ||