Accessing DSL modem

General discussion about Gargoyle, OpenWrt or anything else even remotely related to the project

Moderator: Moderators

Accessing DSL modem

Postby pbix » Wed Oct 21, 2009 7:16 am

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?
pbix
Developer
 
Posts: 1216
Joined: Fri Aug 21, 2009 5:09 pm

Re: Accessing DSL modem

Postby DoesItMatter » Thu Oct 22, 2009 9:47 am

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.
:twisted: Soylent Green Is People! :twisted:
2x Asus RT-N16 = Asus 3.0.0.4.376.48
2x Buffalo WZR-HP-G300NH V1 A0D0 = Gargoyle 1.6.2
Linksys E3000 = Toastman Tomato USB 1.28.7505
TP-Link WR1043ND V1.8 - OpenWRT Trunk 43375
Engenius - ESR900 Stock 1.4.0
User avatar
DoesItMatter
Moderator
 
Posts: 1335
Joined: Thu May 21, 2009 3:56 pm

Re: Accessing DSL modem

Postby pbix » Fri Oct 23, 2009 7:51 am

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
pbix
Developer
 
Posts: 1216
Joined: Fri Aug 21, 2009 5:09 pm

Re: Accessing DSL modem

Postby callsignapollo » Fri Oct 23, 2009 10:46 pm

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.
callsignapollo
 
Posts: 11
Joined: Fri Sep 04, 2009 4:47 am

Re: Accessing DSL modem

Postby BikeMike » Tue Nov 17, 2009 9:30 am

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?
BikeMike
 
Posts: 108
Joined: Sat Jun 13, 2009 8:02 am
Location: Adelaide, South Australia

Re: Accessing DSL modem

Postby callsignapollo » Tue Nov 17, 2009 6:12 pm

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.
callsignapollo
 
Posts: 11
Joined: Fri Sep 04, 2009 4:47 am

Re: Accessing DSL modem

Postby pbix » Mon Dec 06, 2010 8:11 am

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.
pbix
Developer
 
Posts: 1216
Joined: Fri Aug 21, 2009 5:09 pm

Re: Accessing DSL modem

Postby BikeMike » Tue Jan 04, 2011 9:30 pm

Thanks for that, works perfectly :)
BikeMike
 
Posts: 108
Joined: Sat Jun 13, 2009 8:02 am
Location: Adelaide, South Australia

Re: Accessing DSL modem

Postby sionghua » Sat Dec 07, 2013 9:24 am

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.
sionghua
 
Posts: 12
Joined: Thu Jul 23, 2009 12:17 am

Re: Accessing DSL modem

Postby sionghua » Mon Dec 09, 2013 6:51 am

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.
sionghua
 
Posts: 12
Joined: Thu Jul 23, 2009 12:17 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 4 guests