Differences

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

doc:howto:access.modem.through.nat [2013/02/05 20:16]
ghost
doc:howto:access.modem.through.nat [2014/03/19 04:36] (current)
simplexion
Line 3: Line 3:
Once you have the information, you connect the router directly to your PC, give your PC an IP address from the same net and access it with the appropriate program. Easy. To still be able to do that through NAT, follow the instructions: Once you have the information, you connect the router directly to your PC, give your PC an IP address from the same net and access it with the appropriate program. Easy. To still be able to do that through NAT, follow the instructions:
 +
 +| {{:meta:icons:tango:48px-outdated.svg.png?nolink}} | The "config alias" approach is //deprecated//, according to a note on the [[http://wiki.openwrt.org/doc/uci/network|network configuration page]].  And the relevant bits of GUI are not present in Barrier Breaker r38392.  If I find out how else to do this, I'll add it here. [[http://simplebeian.wordpress.com/2014/03/12/accessing-your-modem-from-openwrt-router|Possible resolution to configure from the GUI]] |
===== Through NAT ===== ===== Through NAT =====
Line 12: Line 14:
//Follow these instructions if you are using a default install of backfire and manage the firewall through UCI// //Follow these instructions if you are using a default install of backfire and manage the firewall through UCI//
-Let's say the modem has ''169.254.1.8'' as a default IP. Assign an IP from the same net to the //interface// connected to the modem by utilising aliases:+An IP in the same net as the modem must be assigned to the //interface// which is connected to the modem. To do this, we create an alias as shown below.  
 + 
 +For this example we assume two things: that the modem's IP is ''169.254.1.8'', and that the interface "wan" we are adding an alias to is on eth1. 
Head towards /etc/config/network and add these lines. Head towards /etc/config/network and add these lines.
-<code>config alias modem +<code>config interface modem 
- option interface wan+ option ifname eth1
option proto static option proto static
option ipaddr 169.254.1.1 option ipaddr 169.254.1.1
- option netmask 255.255.255.0 + option netmask 255.255.255.0</code>
- option layer 1</code>+
To exempt the internal modem address range from masquerading, add a "masq_dest" expression to the wan zone in /etc/config/firewall: To exempt the internal modem address range from masquerading, add a "masq_dest" expression to the wan zone in /etc/config/firewall:
Line 117: Line 121:
<code>ifstatus modem</code> <code>ifstatus modem</code>
-The modem should now be pingable from your Router. Because forwarding between lan and pppoe-wan is not allowed, now just simply stick the new interface to the wan zone so it will be forwarded:+The modem should now be pingable from your Router. Because forwarding between lan and eth1 below pppoe-wan is not allowed, now just simply stick the new interface to the wan zone so it will be forwarded:
<code>uci set firewall.@zone[1].network='wan modem' <code>uci set firewall.@zone[1].network='wan modem'

Back to top

doc/howto/access.modem.through.nat.1360091791.txt.bz2 · Last modified: 2013/02/05 20:16 by ghost