Overclockers Australia Forums

OCAU News - Wiki - QuickLinks - Pix - Sponsors  

Go Back   Overclockers Australia Forums > Software Topics > Other Operating Systems

Notices


Sign up for a free OCAU account and this ad will go away!
Search our forums with Google:
Reply
 
Thread Tools
Old 1st October 2002, 10:57 PM   #1
wombo Thread Starter
Member
 
wombo's Avatar
 
Join Date: Jul 2001
Location: Tokyo, Japan
Posts: 1,538
Default Linux / dialup internet

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
wombo is offline   Reply With Quote

Join OCAU to remove this ad!
Old 1st October 2002, 11:06 PM   #2
ToranaGuy
Member
 
ToranaGuy's Avatar
 
Join Date: Jun 2001
Location: ** In the Shed **
Posts: 4,378
Default

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! |
ToranaGuy is offline   Reply With Quote
Old 2nd October 2002, 9:31 AM   #3
Aiken
Member
 
Join Date: Jun 2001
Posts: 344
Default Re: Linux / dialup internet

Quote:
Originally posted by wombo
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
I wrote a couple of cgi scripts call connect and disconnect.

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.
Aiken is offline   Reply With Quote
Old 2nd October 2002, 9:25 PM   #4
wombo Thread Starter
Member
 
wombo's Avatar
 
Join Date: Jul 2001
Location: Tokyo, Japan
Posts: 1,538
Default

thanks so much aiken that was exactly what i was lookin for
__________________
My Camera Gear
wombo is offline   Reply With Quote
Old 5th October 2002, 4:15 PM   #5
wombo Thread Starter
Member
 
wombo's Avatar
 
Join Date: Jul 2001
Location: Tokyo, Japan
Posts: 1,538
Default

how are you calling that CGI script through the website Aiken?
__________________
My Camera Gear
wombo is offline   Reply With Quote
Old 5th October 2002, 4:49 PM   #6
Aiken
Member
 
Join Date: Jun 2001
Posts: 344
Default

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>&nbsp;
<p><a href="http://barney.bedrock/cgi-bin/connect?1800">half hour</a>
<br>&nbsp;
<p><a href="http://barney.bedrock/cgi-bin/connect?3600">one hour</a>
<br>&nbsp;
<p><a href="http://barney.bedrock/cgi-bin/connect?7200">two hours</a>
<br>&nbsp;
<p><a href="http://barney.bedrock/cgi-bin/connect?14400">four hours</a>
<br>&nbsp;
<p><a href="http://barney.bedrock/cgi-bin/connect?32400">nine hours</a>
<br>&nbsp;
<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>
Aiken is offline   Reply With Quote
Old 5th October 2002, 5:08 PM   #7
wombo Thread Starter
Member
 
wombo's Avatar
 
Join Date: Jul 2001
Location: Tokyo, Japan
Posts: 1,538
Default

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
wombo is offline   Reply With Quote
Old 5th October 2002, 6:07 PM   #8
=BF=
Member
 
=BF='s Avatar
 
Join Date: Jun 2001
Location: BrisVegas
Posts: 1,217
Default

I doubt nobody, who runs apache, would have permissions to run ifup. You might have to suid it.
=BF= is offline   Reply With Quote
Old 6th October 2002, 8:26 AM   #9
Aiken
Member
 
Join Date: Jun 2001
Posts: 344
Default

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:
Forbidden You don't have permission to access /cgi-bin/connect.cgi on this server.
I get can get this error if I clear the execute flag on the cgi.
Aiken is offline   Reply With Quote
Old 6th October 2002, 11:57 AM   #10
wombo Thread Starter
Member
 
wombo's Avatar
 
Join Date: Jul 2001
Location: Tokyo, Japan
Posts: 1,538
Default

sorry im a relative newbie with *nix systems and ive got no idea what suid is
__________________
My Camera Gear
wombo is offline   Reply With Quote
Old 6th October 2002, 1:04 PM   #11
Quadbox
Member
 
Quadbox's Avatar
 
Join Date: Jun 2001
Location: Brisbane 4065
Posts: 5,090
Default

Quote:
Originally posted by wombo
sorry im a relative newbie with *nix systems and ive got no idea what suid is
The suid bit is another permissions setting, that makes it so that no matter who executes the program, it will behave as if it was executed by root. You can make a file suid by doing "#chmod +s <filename>"
Quadbox is offline   Reply With Quote
Reply

Bookmarks

Sign up for a free OCAU account and this ad will go away!

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +10. The time now is 3:51 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. -
OCAU is not responsible for the content of individual messages posted by others.
Other content copyright Overclockers Australia.
OCAU is hosted by Internode!