Find the answer to your Linux question:
Results 1 to 5 of 5
hi there! i'm new here (and fairly new to linux) so i don't know if this has been asked before but i plan to install linux, MEPIS in particular, but ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2009
    Posts
    2

    app for connecting/disconnecting the internet


    hi there!

    i'm new here (and fairly new to linux) so i don't know if this has been asked before but i plan to install linux, MEPIS in particular, but i need to find an app that manages the internet conection like i have in windows, one that switches it on and off at certain times, for example.

    is there any such program for linux?

  2. #2
    Linux Newbie Ziplock's Avatar
    Join Date
    Jan 2009
    Location
    Adelaide
    Posts
    169
    Hi navarre9, welcome to the forums!

    Not sure if there is a specific app, but it should be reasonably easy to set up via a command in cron (the task scheduler)

    Not sure what interface you want to shut down, but you could use something like the following:

    Code:
     
    0 10 * * * /usr/bin/ifup <interface name>
    0 22 * * * /usr/bin/ifdown <interface name>
    use 'crontab -e' to edit the scheduler, and the above will start the interface at 10am, and stop it at 10pm

    I'll need more information to be more specific.

    Maybe use the following command to find the interface name:

    Code:
     
    ifconfig

  3. #3
    Just Joined!
    Join Date
    Mar 2009
    Posts
    2
    thanks for the reply ziplock!

    i'm not sure what you mean by "interface", are you referring to the program that i want to switch on/off?

    in any case what i really want to (don't know if it's possible) is i use the peer-to-peer program DC++, and i want to start and end the program at specific times, namely from 2 am to 9 am.
    would the code that you typed do that? because if i just have to do that that would be great!

    i thought it would be easier just to find a way to switch the internet connection on and off so that's what i asked...

  4. #4
    Linux Newbie Ziplock's Avatar
    Join Date
    Jan 2009
    Location
    Adelaide
    Posts
    169
    i'm not sure what you mean by "interface", are you referring to the program that i want to switch on/off?
    Sorry, the logical 'things' in Linux that serve as the doors to the network are called 'network interfaces'. Generally 'eth0' or 'eth1' etc for normal networking. You can see this with the 'ifconfig' command previously posted.

    in any case what i really want to (don't know if it's possible) is i use the peer-to-peer program DC++, and i want to start and end the program at specific times, namely from 2 am to 9 am.
    would the code that you typed do that? because if i just have to do that that would be great!
    You can still use cron do do what you want. I suggest looking at the man pages, or google 'cron' to find out how to set the schedule. To start the program you will need to so something like:

    Code:
    0 2 * * * /usr/bin/dc++
    NOTE: You will need to replace /usr/bin/dc++ with the path the program.

  5. #5
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    5,023
    Welcome to LinuxForums!

    While ziplock has provided excellent explanations, I saw a little confusion in your reply. So here ya go...

    interface = Your NIC

    cron = Your chronologically timed applications file, like turning off your NIC at 10 p.m.

    Other than that, make sure to check out the man pages, as suggested.
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •