Accessing DSL modem
Moderator: Moderators
Accessing DSL modem
My connection is through a DSL modem which is configured in bridge mode. My Gargoyle router then performs the PPPoE login function. All this works great.
However, my DSL modem has a web interface which has some nifty information about the status of the DSL connection. So how can I access this interface? When I was using DD-WRT I added the following commands to the startup script.
ifconfig vlan1:1 10.0.0.2 netmask 255.255.255.0
iptables -I POSTROUTING -t nat -o vlan1 -d 10.0.0.0/24 -j MASQUERADE
My modem is setup at 10.0.0.1 and with above I could access my modem using the URL 10.0.0.1.
So then how would I do the same using Gargoyle?
However, my DSL modem has a web interface which has some nifty information about the status of the DSL connection. So how can I access this interface? When I was using DD-WRT I added the following commands to the startup script.
ifconfig vlan1:1 10.0.0.2 netmask 255.255.255.0
iptables -I POSTROUTING -t nat -o vlan1 -d 10.0.0.0/24 -j MASQUERADE
My modem is setup at 10.0.0.1 and with above I could access my modem using the URL 10.0.0.1.
So then how would I do the same using Gargoyle?
Linksys WRT1900ACv2
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM
- DoesItMatter
- Moderator
- Posts: 1373
- Joined: Thu May 21, 2009 3:56 pm
Re: Accessing DSL modem
You could try doing this as a temporary fix.
I usually don't mess with IP Tables myself.
From the computer you are trying to access the DSL modem.
Put that computer IP into the Gargoyle's DMZ zone
then goto a web page and type in the 10.0.0.1
it should be able to access the DSL modem settings/information
Remember to disable DMZ afterwards.
I usually don't mess with IP Tables myself.
From the computer you are trying to access the DSL modem.
Put that computer IP into the Gargoyle's DMZ zone
then goto a web page and type in the 10.0.0.1
it should be able to access the DSL modem settings/information
Remember to disable DMZ afterwards.


2x Asus RT-N16 = Asus 3.0.0.4.374.43 Merlin
2x Buffalo WZR-HP-G300NH V1 A0D0 = Gargoyle 1.9.x / LEDE 17.01.x
2x Engenius - ESR900 Stock 1.4.0 / OpenWRT Trunk 49400
Re: Accessing DSL modem
I tired the suggestion of DoesItMatter without apparent success.
Some research on the OpenWRT web site found this thread.
https://forum.openwrt.org/viewtopic.php?id=18333
This approach worked for me so now the question is how to add this to the Gargoyle interface so that PPPoE users can access their modems.
Add the following to /lib/firewall/uci_firewall.sh just before load_policy()
Some research on the OpenWRT web site found this thread.
https://forum.openwrt.org/viewtopic.php?id=18333
This approach worked for me so now the question is how to add this to the Gargoyle interface so that PPPoE users can access their modems.
Add the following to /lib/firewall/uci_firewall.sh just before load_policy()
Code: Select all
#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 #Obviously you need to configure the actual DSL modem to
#use the address you select in MODEM_IP.
MODEM_IP="10.0.0.1"
#IP address that will be bound to vlan1, usually safe to just increment MODEM_IP by 1.
VLAN_IP="10.0.0.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
Linksys WRT1900ACv2
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM
-
- Posts: 11
- Joined: Fri Sep 04, 2009 4:47 am
Re: Accessing DSL modem
pbix - so what exactly did you put in that file? My router IP is 192.168.1.1 - and my modem is 10.1.1.1 - what should I put in that file? Thank you.
EDIT: Never mind - I forgot to reboot the router
That worked for me
Thanks a lot pbix.
EDIT: Never mind - I forgot to reboot the router

Code: Select all
MODEM_IP="10.1.1.1"
VLAN_IP="10.1.1.2"
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

Re: Accessing DSL modem
I would like to do this. How do I edit the file? I can connect with SSH (using putty) but what then? Or is there an easier way?
-
- Posts: 11
- Joined: Fri Sep 04, 2009 4:47 am
Re: Accessing DSL modem
Yes, you just edit the file via putty, save it, reboot the router and you're good to go.BikeMike wrote:I would like to do this. How do I edit the file? I can connect with SSH (using putty) but what then? Or is there an easier way?
Re: Accessing DSL modem
PPPoE users,
As of v1.3.9 Gargoyle will address this issue automatically if you configure your modem correctly. As a result the solution identified previously in this thread is obsolete.
In addition to being in 'bridge' mode your modem should also be configured to be a DHCP server on its LAN interface. In response to this configuration Gargoyle will request an address for the interface connected to the modem and configure the needed routes and rules to give you access.
Once again, there are no configuration settings in Gargoyle to make this work. You only needed to enable DHCP on your modem's LAN interface.
If for some reason you cannot do this or you prefer not to you can manually set an IP address for your router in the file /etc/ppp/ip-up.d/modemaccess.sh. There are instructions there on what to do. However, manual changes in this file will be lost everything you upgrade Gargoyle.
As of v1.3.9 Gargoyle will address this issue automatically if you configure your modem correctly. As a result the solution identified previously in this thread is obsolete.
In addition to being in 'bridge' mode your modem should also be configured to be a DHCP server on its LAN interface. In response to this configuration Gargoyle will request an address for the interface connected to the modem and configure the needed routes and rules to give you access.
Once again, there are no configuration settings in Gargoyle to make this work. You only needed to enable DHCP on your modem's LAN interface.
If for some reason you cannot do this or you prefer not to you can manually set an IP address for your router in the file /etc/ppp/ip-up.d/modemaccess.sh. There are instructions there on what to do. However, manual changes in this file will be lost everything you upgrade Gargoyle.
Linksys WRT1900ACv2
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM
Re: Accessing DSL modem
Thanks for that, works perfectly 

Re: Accessing DSL modem
I am using Gargoyle 1.5.11 and TP-LINK TD-8817 in bridge mode. I do have the DHCP server at TD-8817 enabled but I still can't access it unless I edit the modemaccess.sh file in gargoyle.
Re: Accessing DSL modem
Downgraded to Gargoyle 1.5.10 and it actually works without having to edit modemaccess.sh file.
I have been having ADSL disconnect issue as well after upgrading to 1.5.11. Let's see if the disconnection problem is solved after downgrading to 1.5.10.
I have been having ADSL disconnect issue as well after upgrading to 1.5.11. Let's see if the disconnection problem is solved after downgrading to 1.5.10.