Page 1 of 1

Accessing DSL modem

Posted: Wed Oct 21, 2009 7:16 am
by pbix
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?

Re: Accessing DSL modem

Posted: Thu Oct 22, 2009 9:47 am
by DoesItMatter
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.

Re: Accessing DSL modem

Posted: Fri Oct 23, 2009 7:51 am
by pbix
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()

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

Re: Accessing DSL modem

Posted: Fri Oct 23, 2009 10:46 pm
by callsignapollo
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 ;)

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
That worked for me :) Thanks a lot pbix.

Re: Accessing DSL modem

Posted: Tue Nov 17, 2009 9:30 am
by BikeMike
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

Posted: Tue Nov 17, 2009 6:12 pm
by callsignapollo
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?
Yes, you just edit the file via putty, save it, reboot the router and you're good to go.

Re: Accessing DSL modem

Posted: Mon Dec 06, 2010 8:11 am
by pbix
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.

Re: Accessing DSL modem

Posted: Tue Jan 04, 2011 9:30 pm
by BikeMike
Thanks for that, works perfectly :)

Re: Accessing DSL modem

Posted: Sat Dec 07, 2013 9:24 am
by sionghua
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

Posted: Mon Dec 09, 2013 6:51 am
by sionghua
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.