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.


art3011

39 posts

Geek


#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
billgates
4705 posts

Uber Geek

Trusted

  #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.

  



art3011

39 posts

Geek


  #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


billgates
4705 posts

Uber Geek

Trusted

  #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.

  



art3011

39 posts

Geek


  #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.

billgates
4705 posts

Uber Geek

Trusted

  #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.

  

art3011

39 posts

Geek


  #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 ?

billgates
4705 posts

Uber Geek

Trusted

  #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.

  

 
 
 

Trade NZ and US shares and funds with Sharesies (affiliate link).
mentalinc
3240 posts

Uber Geek

Trusted

  #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: AMD 5900x | RAM: GSKILL Trident Z Neo RGB F4-3600C16D-32GTZNC-32-GB | MB:  Asus X570-E | GFX: EVGA FTW3 Ultra RTX 3080Ti| Monitor: LG 27GL850-B 2560x1440

 

Quic: https://account.quic.nz/refer/473833 R473833EQKIBX 


Create new topic





News and reviews »

Air New Zealand Starts AI adoption with OpenAI
Posted 24-Jul-2025 16:00


eero Pro 7 Review
Posted 23-Jul-2025 12:07


BeeStation Plus Review
Posted 21-Jul-2025 14:21


eero Unveils New Wi-Fi 7 Products in New Zealand
Posted 21-Jul-2025 00:01


WiZ Introduces HDMI Sync Box and other Light Devices
Posted 20-Jul-2025 17:32


RedShield Enhances DDoS and Bot Attack Protection
Posted 20-Jul-2025 17:26


Seagate Ships 30TB Drives
Posted 17-Jul-2025 11:24


Oclean AirPump A10 Water Flosser Review
Posted 13-Jul-2025 11:05


Samsung Galaxy Z Fold7: Raising the Bar for Smartphones
Posted 10-Jul-2025 02:01


Samsung Galaxy Z Flip7 Brings New Edge-To-Edge FlexWindow
Posted 10-Jul-2025 02:01


Epson Launches New AM-C550Z WorkForce Enterprise printer
Posted 9-Jul-2025 18:22


Samsung Releases Smart Monitor M9
Posted 9-Jul-2025 17:46


Nearly Half of Older Kiwis Still Write their Passwords on Paper
Posted 9-Jul-2025 08:42


D-Link 4G+ Cat6 Wi-Fi 6 DWR-933M Mobile Hotspot Review
Posted 1-Jul-2025 11:34


Oppo A5 Series Launches With New Levels of Durability
Posted 30-Jun-2025 10:15









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.