Join us now. It is free, and it takes less than 1 minute to register.
Register now
Subscribe to our daily newsletter. It is free, and it comes with many benefits.


+ Reply to Thread
Page 4 of 14 FirstFirst 12345678 ... LastLast
Results 46 to 60 of 199

Thread: Splitting International and Local Bandwidth with IPcop

  1. #46
    Senior Member
    Join Date
    Apr 2005
    Location
    Johannesburg
    Posts
    149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation ooops

    @ ASS_SAZiN` - Yes, it sorted my issue. Thanks again.

    As for this earlier post of mine:
    Quote Originally Posted by ArminM View Post
    Not sure if anyone on this thread is interested, but you can get all the "local" subnets here

    and it gets updated every 24hrs

    Ready made route add commands
    It is WRONG!! I did not take into account the subnetting / supernetting and have subsequently updated the script (correctly this time I hope)

    so the route add commands are here now.

    Apologies for the mistake.
    if (!preg_match("(^[-\w\.][email protected]([-a-z0-9]+\.)+[a-z]{2,4}$)i", $email)) echo "Email address $email is not valid";

  2. #47
    Super Grandmaster Gnome's Avatar
    Join Date
    Sep 2005
    Location
    Cape Town
    Posts
    5,564
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Haven't been following this topic fully but it seems to me you use static list as your local subnets. In the event of a change you'd need to update this list not? Isn't there a way you can telnet (see this thread the last post made by daffy) a server using the script and get a up to date subnet list from the server? I suppose the question should be is it possible to telnet using IPCOP VS. can you do it via a script if it where available. It's a simple task even in DOS (simple telnet ----commandes--- >> localsubnetlist.txt where all the subnets would then be saved in the localsubnetlist.txt file, surely it's not hard for the "all powerfull" linux shell?)

    Hope you following what I'm saying otherwise feel free to ask me to clarify.

  3. #48
    Grandmaster
    Join Date
    Jun 2006
    Posts
    4,440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Yes it can be done easily.
    I have a script that I run to grab an updated IGP list.


    #!/bin/bash

    echo -e "terminal length 0\nshow ip bgp\nexit" | nc route-server.is.co.za 23 | grep ^* | awk '{print $2}' > zanet-routes.dat


    That logs into the IS route server, grabs a new BGP list, sticks it into a file and then disconnects. nc is a better tool to use than telnet in this case.

    The same can be done with most apps in bash. I've done it lots of times to grab files off FTP servers automatically in the background from a cronjob.
    All you do is just keep adding new commands separated by a new line \n which is the same as hitting the enter key after each command if you were doing it manually.

  4. #49
    Super Grandmaster Gnome's Avatar
    Join Date
    Sep 2005
    Location
    Cape Town
    Posts
    5,564
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Could you perhaps provide a working example (for IPCOP?)?

    No offense to linux users but I don't have much love for the OS (apart from using it as a server or router, I don't really feel this is the thread in which to elaborate why) and don't have much knowledge working with bash(apart from copy delete, ls and all that basic stuff) and don't really feel like wasting my time reading the man pages to figure out how to get it to work.

    EDIT: Or would your above example work for IPCOP?

  5. #50
    Grandmaster
    Join Date
    Jun 2006
    Posts
    4,440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Quote Originally Posted by Gnome View Post
    EDIT: Or would your above example work for IPCOP?
    The above should work with IPCop if it has nc installed which is quite probable.
    Type nc at the command prompt and see if netcat is installed.
    awk and grep should definitely be installed by default.

    Someone should package all of these scripts together and release it in one package but I'm not going to volunteer for that job.

  6. #51
    Super Grandmaster Gnome's Avatar
    Join Date
    Sep 2005
    Location
    Cape Town
    Posts
    5,564
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Good idea now to find a sucker... uh *cough* *cough* I mean volunteer to do it

    EDIT: Seriously it would be appreciated, don't be shy I was just joking

  7. #52
    Grandmaster
    Join Date
    May 2006
    Location
    Edenvale
    Posts
    1,899
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Quote Originally Posted by ArminM View Post
    @ ASS_SAZiN` - Yes, it sorted my issue. Thanks again.

    As for this earlier post of mine:


    It is WRONG!! I did not take into account the subnetting / supernetting and have subsequently updated the script (correctly this time I hope)

    so the route add commands are here now.

    Apologies for the mistake.
    Hi ArminM

    Thanks for the list. Are these updated every 24h

  8. #53
    Grandmaster
    Join Date
    May 2006
    Location
    Edenvale
    Posts
    1,899
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Quote Originally Posted by Gnome View Post
    Could you perhaps provide a working example (for IPCOP?)?

    No offense to linux users but I don't have much love for the OS (apart from using it as a server or router, I don't really feel this is the thread in which to elaborate why) and don't have much knowledge working with bash(apart from copy delete, ls and all that basic stuff) and don't really feel like wasting my time reading the man pages to figure out how to get it to work.

    EDIT: Or would your above example work for IPCOP?
    Hi Gnome

    nc is not installed by IPcop. Being a firewall IPcop installs the minimum amount of packages needed. It doesnt even have man installed, so no man pages.

    But it does have wget installed so you could put wget in a script and pull the file down.

    Here is the command I tried:

    HTML Code:
    @ipcop:~ # wget http://www.alm.za.net/ip/localroutes.txt]
    --10:59:05--  http://www.alm.za.net/ip/localroutes.txt]
               => `localroutes.txt'
    Resolving www.alm.za.net... 67.43.14.74
    Connecting to www.alm.za.net[67.43.14.74]:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 46,335 [text/plain]
    
    100%[====================================>] 46,335        31.94K/s
    
    10:59:07 (31.89 KB/s) - `localroutes.txt' saved [46335/46335]

    HTH

  9. #54
    Grandmaster
    Join Date
    May 2006
    Location
    Edenvale
    Posts
    1,899
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Quote Originally Posted by Gnome View Post
    Good idea now to find a sucker... uh *cough* *cough* I mean volunteer to do it

    EDIT: Seriously it would be appreciated, don't be shy I was just joking
    I'll try put it all into a single script this week. If it works, I'll let yall know. shouldnt be too difficult (famous last words)

  10. #55
    Grandmaster
    Join Date
    Aug 2006
    Location
    England
    Posts
    3,752
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    If this will work on ClarkConnect - it will be unstoppable.
    I'm running it on a PII 333Mhz with 192MB of RAM, it's doing everything now, and flying. (SMTP Mail, File Shares, Printer Shares, Firewall)

    Can't wait for that packaged script to give it a go. Ideally wanting to get my local only account going again.

  11. #56
    Senior Member
    Join Date
    Apr 2005
    Location
    Johannesburg
    Posts
    149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Wink

    Quote Originally Posted by Bernie View Post
    Hi ArminM

    Thanks for the list. Are these updated every 24h
    yep, but i'm looking into a diff solution
    if (!preg_match("(^[-\w\.][email protected]([-a-z0-9]+\.)+[a-z]{2,4}$)i", $email)) echo "Email address $email is not valid";

  12. #57
    Senior Member
    Join Date
    Apr 2005
    Location
    Johannesburg
    Posts
    149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Quote Originally Posted by Gnome View Post
    Good idea now to find a sucker... uh *cough* *cough* I mean volunteer to do it

    EDIT: Seriously it would be appreciated, don't be shy I was just joking
    Compiled the required tools, and busy looking into it.

    I'm also not sure if this'll work if you have a blue / orange in your setup
    if (!preg_match("(^[-\w\.][email protected]([-a-z0-9]+\.)+[a-z]{2,4}$)i", $email)) echo "Email address $email is not valid";

  13. #58
    Senior Member
    Join Date
    Apr 2005
    Location
    Johannesburg
    Posts
    149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Just an update on the localroutes.txt - there seem to be additional small glitches....... checking into it.
    if (!preg_match("(^[-\w\.][email protected]([-a-z0-9]+\.)+[a-z]{2,4}$)i", $email)) echo "Email address $email is not valid";

  14. #59
    Senior Member
    Join Date
    Apr 2005
    Location
    Johannesburg
    Posts
    149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Quote Originally Posted by Paul_S View Post
    Yes it can be done easily.
    I have a script that I run to grab an updated IGP list.


    #!/bin/bash

    echo -e "terminal length 0\nshow ip bgp\nexit" | nc route-server.is.co.za 23 | grep ^* | awk '{print $2}' > zanet-routes.dat


    That logs into the IS route server, grabs a new BGP list, sticks it into a file and then disconnects. nc is a better tool to use than telnet in this case.

    The same can be done with most apps in bash. I've done it lots of times to grab files off FTP servers automatically in the background from a cronjob.
    All you do is just keep adding new commands separated by a new line \n which is the same as hitting the enter key after each command if you were doing it manually.
    Being an IS Server.... would there be any IS vs SAIX vs Verison funnies to look into?

    EDIT: nevermind.....typing without thinking
    Last edited by ArminM; 20-02-2007 at 02:41 PM. Reason: dumb q
    if (!preg_match("(^[-\w\.][email protected]([-a-z0-9]+\.)+[a-z]{2,4}$)i", $email)) echo "Email address $email is not valid";

  15. #60
    Senior Member
    Join Date
    Apr 2005
    Location
    Johannesburg
    Posts
    149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default last round - hopefully

    ok, this should do it then:

    localroutes4 / 24h updates

    I had to increase my sleep time prior to running the route commands in the script and had to put an additional sleep somewhere in between the route commands.

    hth, let me know.

    EDIT: Thanks to Bernie, Paul_S, Gnome and daffy, as this was done using their advice and assistance
    Last edited by ArminM; 20-02-2007 at 10:18 PM. Reason: credits
    if (!preg_match("(^[-\w\.][email protected]([-a-z0-9]+\.)+[a-z]{2,4}$)i", $email)) echo "Email address $email is not valid";

+ Reply to Thread
Page 4 of 14 FirstFirst 12345678 ... LastLast

Tags for this Thread

Bookmarks

Bookmarks

Posting Permissions

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