![]() |
![]() OCAU News - Wiki - QuickLinks - Pix - Sponsors |
|
|||||||
| Notices |
|
Sign up for a free OCAU account and this ad will go away! Search our forums with Google: |
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Member
Join Date: Jul 2001
Location: Tokyo, Japan
Posts: 1,538
|
does anybody know of a way to connect and disconnect from the internet using a browser interface
at the moment i can dialup but have to telnet in i also have apache working
__________________
My Camera Gear |
|
|
|
| Join OCAU to remove this ad! |
|
|
#2 |
|
Member
Join Date: Jun 2001
Location: ** In the Shed **
Posts: 4,378
|
What about the PPP package's for the GUI?? Like i think it's Kppp for KDE?? You might be able to setup your boxen to auto load the PPP package when the browser start's.....
Cheers ToranaGuy
__________________
| Time for a Sig Update - old one was very old! |Still folding on, now a 9,000ppw member!| Currently on ADSL 2+, 5mbit/900kbit speed. Thanks TPG ADSL @+ | There's no replacement for displacement, but you can always compliment it with BOOST! | |
|
|
|
|
|
#3 | |
|
Member
Join Date: Jun 2001
Posts: 344
|
Quote:
connect.cgi #!/bin/bash echo Content-type: text/html echo echo ifup ppp0 echo Connected disconnect.cgi echo Content-type: text/html echo echo ifdown ppp0 echo Disconnected This can be expand on so that connection time are selected. My connect cgi does a lot more than the above example. You want to connect 2 hours, click on the link that says 2 hours. Have connect.cgi call another script that goes into the background and goes to sleep for 2 hours. When it wakes up call ifdown ppp0. |
|
|
|
|
|
|
#4 |
|
Member
Join Date: Jul 2001
Location: Tokyo, Japan
Posts: 1,538
|
thanks so much aiken that was exactly what i was lookin for
__________________
My Camera Gear |
|
|
|
|
|
#5 |
|
Member
Join Date: Jul 2001
Location: Tokyo, Japan
Posts: 1,538
|
how are you calling that CGI script through the website Aiken?
__________________
My Camera Gear |
|
|
|
|
|
#6 |
|
Member
Join Date: Jun 2001
Posts: 344
|
This is the raw html from the page I use to connect and disconnect from the internet.
<html> <head> <title>Internet conenction page</title> </head> <body> <center><a href="http://barney.bedrock/cgi-bin/connect?900">15 minutes</a> <br> <p><a href="http://barney.bedrock/cgi-bin/connect?1800">half hour</a> <br> <p><a href="http://barney.bedrock/cgi-bin/connect?3600">one hour</a> <br> <p><a href="http://barney.bedrock/cgi-bin/connect?7200">two hours</a> <br> <p><a href="http://barney.bedrock/cgi-bin/connect?14400">four hours</a> <br> <p><a href="http://barney.bedrock/cgi-bin/connect?32400">nine hours</a> <br> <p><a href="http://barney.bedrock/cgi-bin/connect?172800">couple of days</a> <hr> <center> <p><a href="http://barney.bedrock/cgi-bin/disconnect">Disconnect</a></center> </body> </html> |
|
|
|
|
|
#7 |
|
Member
Join Date: Jul 2001
Location: Tokyo, Japan
Posts: 1,538
|
i pu this line in my page
<a href="http://192.168.0.1/cgi-bin/connect">connect</a> but it says this Forbidden You don't have permission to access /cgi-bin/connect.cgi on this server. ive done chmod 755 connect.cgi
__________________
My Camera Gear |
|
|
|
|
|
#8 |
|
Member
Join Date: Jun 2001
Location: BrisVegas
Posts: 1,217
|
I doubt nobody, who runs apache, would have permissions to run ifup. You might have to suid it.
|
|
|
|
|
|
#9 | |
|
Member
Join Date: Jun 2001
Posts: 344
|
Initially I had to set the suid flag on the 2 cgi scripts. Not anymore.
The permission on both connect.cgi and disconnect.cgi are 755. Suid is not set. I had a look at ifup and ifdown, suid is not set. Found pppd does have it set. Both owner.group for the cgi scripts are set to root.root. I think pppd need suid if a normal user is to able to bring up a pppd link. Quote:
|
|
|
|
|
|
|
#10 |
|
Member
Join Date: Jul 2001
Location: Tokyo, Japan
Posts: 1,538
|
sorry im a relative newbie with *nix systems and ive got no idea what suid is
__________________
My Camera Gear |
|
|
|
|
|
#11 | |
|
Member
Join Date: Jun 2001
Location: Brisbane 4065
Posts: 5,090
|
Quote:
|
|
|
|
|
![]() |
| Bookmarks |
|
Sign up for a free OCAU account and this ad will go away! |
| Thread Tools | |
|
|