OpenWrt Forum Archive

Topic: Access to DSL modem stats, etc. when using PPPoE?

The content of this topic has been archived on 8 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi

My issue is essentially this:

I have a WRT54GS v1.1 and a DSL modem.  If I assign a static address to eth0.1, I can easily reach my DSL modem's web server from the LAN side of the router.  But if that same port is configured as PPPoE, I'm no longer able to reach it at that IP address.  I understand why this is.

I was reading an old thread about this.  If I just "ifconfig eth0.1 192.168.2.1" (the modem's IP is 192.168.2.254) while the PPP connection is up, I'm able to telnet to the modem while logged into the router.  I'm *not* able to reach this address from the LAN side.

So the question:

Can I configure eth0.1 in such a way that PPPoE will still work as expected *and* I'm able to reach the modem's web server from the LAN side of the router?

Thanks in advance.

I was able to allow access to my modem by logging into my router via ssh and modifying /lib/firewall/uci_firewall.sh

adding these lines before load_policy() {

#IP Address of the modem, must be a different network from your local LAN.
#If you use 192.168.x.x for LAN then use 10.0.0.x for modem, etc (basically, pick a free IANA reserved range)
#Obviously you need to configure the actual DSL modem to use the address you select in MODEM_IP.
MODEM_IP="192.168.1.1"
 
#IP address that will be bound to vlan1, usually safe to just increment MODEM_IP by 1.
VLAN_IP="192.168.1.2"
 
#Setup network interface and firewall rules.
ifconfig eth0.1 $VLAN_IP netmask 255.255.255.0
iptables -A forwarding_rule -d $MODEM_IP -j ACCEPT
iptables -t nat -A POSTROUTING -d $MODEM_IP -j MASQUERADE

I took that from the old whiterussian method though i had to modiy the aforementioned file instead of putting that as /etc/rc.d/S52modemroute as when the router restarted or i changed some settings then access was lost, i've yet to test this more thoroughly but it should load every time the router starts

(Last edited by CyberAxe on 11 Oct 2009, 01:33)

The discussion might have continued from here.