Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I know it's possible to configure the modem to automatically connect the internet using a browser, but I want to do it using bash.

I would like the network to automatically connect when the system boots.

I have a ADSL2 router/modem and I'm using the Debian 6 Squeeze.

share|improve this question
1  
Does your router have a command line interface if you ssh to it? (You might need to enable that in the browser first.) This is a modem+router connected to the computer over Ethernet/wifi, right? –  Gilles Jul 11 '12 at 23:04
    
@Gilles Yes I have a Modem(ADSL2)+Router connected to the computer over Ethernet –  Zignd Jul 12 '12 at 13:14
    
@Gilles I will check if there is an option on the browser graphical interface. –  Zignd Jul 12 '12 at 13:16

1 Answer 1

up vote 2 down vote accepted

Usually it is possible but how to depends on your router interface.

Many router can be configured via UPnP or snmp protocol. It'd be easy to find some command-line client for these protocols (e.g. MiniUPnP, net-snmp).

If your router does not support any of these well known protocols, you could try to emulate a browser via some command line tool as wget or curl. E.g. I can reboot my ipfire router using: wget --user=USER --password=PASS https://myrouterip:444/cgi-bin/index.cgi?ACTION=Reboot

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.