Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.




39 posts

Geek


Topic # 57953 2-Mar-2010 11:47
Send private message

I have a Draytek 120 configured as modem only bridged mode connected to a Linksys WRT54GL router running tomato.  I can connect to the Linksys router web interface using 192.168.1.1.  Is there a way to connect to the Draytek web interface without unplugging it from the router and plugging it directly to my compter.  I configured the Draytek to have an address of 192.168.2.1, but I don't know how to connect to the to web interface while still attached to the Linksys router. 

Create new topic
3833 posts

Uber Geek
+1 received by user: 234

Trusted

  Reply # 303614 2-Mar-2010 12:08
Send private message

same setup.

here is what i have to access the modem

modem - 10.0.0.1
router - 192.168.1.1

then in tomato under administration, scripts, firewall, add this line

sleep 5
ip addr add 10.0.0.10/24 dev vlan1 brd +

/usr/sbin/iptables -I POSTROUTING -t nat -o vlan1 -d 10.0.0.0/24 -j MASQUERADE

OR

just add this line and see if it works


/usr/sbin/iptables -I POSTROUTING -t nat -o vlan1 -d 192.168.0.0/24 -j MASQUERADE

make sure you reboot the router afterwards.




Do whatever you want to do man.

  



39 posts

Geek


  Reply # 303640 2-Mar-2010 12:59
Send private message

Thanks billgates.

I tried adding on firewall script page as you said:
/usr/sbin/iptables -I POSTROUTING -t nat -o vlan1 -d 192.168.0.0/24 -j MASQUERADE

However it did not work when reboot. There is even no response when I ping 192.168.2.1. Can you tell me exactly how I should put the script on my firewall page. My addresses:

modem = 192.168.2.1
router = 192.168.1.1

In your situation, I don't understand why you used 10.0.0.10/24 on your ip addr add command when your modem address is 10.0.0.1 (and not 10.0.0.10). Sorry, I'm not an expert on networking and using ip and iptables commands.

Thanks


 
 
 
 


3833 posts

Uber Geek
+1 received by user: 234

Trusted

  Reply # 303649 2-Mar-2010 13:12
Send private message

Try this.

under Init tab in admin/scripts page

add this line

sleep 5
ip addr add 192.168.2.1/24 dev vlan1 brd +

and under firewall tab

add this line

/usr/sbin/iptables -I POSTROUTING -t nat -o vlan1 -d 192.168.2.0/24 -j MASQUERADE

reboot and try accessing again.

draytek's do full bridge mode where my set up is half bridge mode with a different modem but the script above hopefully will work.




Do whatever you want to do man.

  



39 posts

Geek


  Reply # 303728 2-Mar-2010 16:54
Send private message

Thanks again billgates.

I tried the commands above on the init and firewall tab. But when I try 192.168.2.1, it goes to my router and not my modem. So 192.168.2.1 = 192.168.1.1.

3833 posts

Uber Geek
+1 received by user: 234

Trusted

  Reply # 303758 2-Mar-2010 18:55
Send private message

Try this..

under Init

sleep 5
ip addr add 192.168.2.2/24 dev vlan1 brd +

and under firewall

/usr/sbin/iptables -I POSTROUTING -t nat -o vlan1 -d 192.168.2.0/24 -j MASQUERADE

reboot and see

if it does not works then edit instead of 192.168.2.0/24 make it 192.168.2.1/24 for the firewall script above




Do whatever you want to do man.

  



39 posts

Geek


  Reply # 303764 2-Mar-2010 19:24
Send private message

Thanks, 192.168.2.2 works. Now I can access the modem with 192.168.2.1. Just my curiosity, why is there a need for a 'sleep 5' on top of the init script. Is there some quirk in tomato ?

3833 posts

Uber Geek
+1 received by user: 234

Trusted

  Reply # 303766 2-Mar-2010 19:27
Send private message

The startup script actually runs ahead of some services. Things that involve networking, for example, are not going to be up yet when the startup script begins. To work around this, use "sleep 5" or a similar command to wait until what you need is up and running.




Do whatever you want to do man.

  

1586 posts

Uber Geek
+1 received by user: 156

Trusted

  Reply # 565642 7-Jan-2012 08:15
Send private message

As part of my digging up old threads as I replace my RTA 1320 with first the TP-Link 8840T (which Doesn't work in IP forwarding). The above steps only work on Tomato for dd-wrt the following wiki page provides the required steps:
http://www.dd-wrt.com/wiki/index.php/Access_To_Modem_Configuration

So using the example above where the modem = 192.168.2.1

Startup:
ifconfig `nvram get wan_ifname`:0 192.168.2.2 netmask 255.255.255.0

Firewall:
iptables -t nat -I POSTROUTING -o `nvram get wan_ifname` -j MASQUERADE


Working a treat in Firefox anyway. IE9 seems to get all confused and stop working...
Browsing is nice and quick with firefox though so easy to check the settings and sync etc. I'd still suggest directly connecting to the computer when doing firmware updates just to be safe....




CPU: Intel 3770k| RAM: F3-2400C10D-16GTX G.Skill Trident X |MB:  Gigabyte Z77X-UD5H-WB | GFX: GV-N660OC-2GD gv-n660oc-2gd GeForce GTX 660 | Monitor: Qnix 27" 2560x1440

 

 


Create new topic



Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.