Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 10-22-2003, 03:04 PM   #1
Registered: Sep 2003
Location: Bulgaria
Distribution: Ubuntu 9.10, FreeBSD 7.2
Posts: 459

Rep: Reputation: 31
Advanced routing questions

I've read latrc, but it seems very complicated for me. This is the situation that I'm trying to solve:
I have LAN with 15 hosts.
I have an ISP that provides internet via LAN, 4KBps, 150MB monthly traffic.
How can I build a gateway (+proxy?) that can:
-provide internet to only 4 hosts;
-reduce the bandwith to 2KBps per host (if 2 are up and downloading, that mean that the whole channel will be used);
-stop the routing if the 150MB monthly traffic is made.
The gateway has real IP if that helps. So here is the way I think these objects can be done:
-NAT (or ipmasq?) to the 4 hosts, and write others in hosts.deny;
-proxy (squid?);
-i don't know.

Can all of that be done with the Slackware 9 default kernell (bare.i, 2.4.20) or I need to precompile one?
Please don't give me a link to the latrc, I've read it, there are a lot of strange commands (ip: command not found) and things.. and the whole tutorial is based on that command.. so everything else will be welcomed.
Thanks in advance

Last edited by ivanatora; 10-22-2003 at 03:15 PM.
Old 10-22-2003, 09:44 PM   #2
LQ Newbie
Registered: Jul 2003
Distribution: Gentoo
Posts: 29

Rep: Reputation: 15
This HOWTO was very helpful to me when setting up a somewhat similar network to what you describe. It addresses setting up IP-Masquerading (aka NAT) to allow hosts on the internal network internet access. It only describes granting access to the entire internal network, but it should be fairly simple to only allow specific hosts. Just change

# local interface, local machines, going anywhere is valid
to only allow specific hosts:
# local interface, local allowed machines, going anywhere is valid
$IPTABLES -A INPUT -i $INTIF -s <allowed-host1-ip> -d $UNIVERSE -j ACCEPT
$IPTABLES -A INPUT -i $INTIF -s <allowed-host2-ip> -d $UNIVERSE -j ACCEPT
$IPTABLES -A INPUT -i $INTIF -s <allowed-host3-ip> -d $UNIVERSE -j ACCEPT
$IPTABLES -A INPUT -i $INTIF -s <allowed-host4-ip> -d $UNIVERSE -j ACCEPT
As far as the bandwidth limiting goes, I have no experience, but this HOWTO may be helpful (I don't know - I haven't used it).

No idea on how to set the total traffic cap. I'm pretty sure it can be done, but no idea how to implement it.

Wish you luck,
Old 10-23-2003, 03:09 AM   #3
Registered: Sep 2003
Location: Bulgaria
Distribution: Ubuntu 9.10, FreeBSD 7.2
Posts: 459

Original Poster
Rep: Reputation: 31
Everywhere I've looked is sbq. Is that some kind of program, or a kernel feature? The same thing with iproute2. It 'should' be in every linux distribution.. but I can't find it via locate or whereis. Is it a kernel feature, too?
Old 10-23-2003, 04:01 AM   #4
Registered: Sep 2003
Location: Bulgaria
Distribution: Ubuntu 9.10, FreeBSD 7.2
Posts: 459

Original Poster
Rep: Reputation: 31
I downloaded and installed iproute2 from . SBQ is a kernel feature that I don't have enabled.. so I'll have to compile a new kernel.. I had 2.4.22 sources around here somewhere...


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Advanced routing across multiple WAN links ? michaelsanford Linux - Networking 1 06-28-2005 09:23 PM
Routing help, a little more advanced than most howtos thebudbottle Linux - Networking 1 10-01-2004 08:14 PM
Advanced Networking - Multiple gateways, routing question/shorewall micaheli Linux - Networking 2 09-30-2004 12:05 AM
Advanced Routing Problem sirrus_linux Linux - Networking 6 09-22-2004 05:41 AM
Advanced Routing bakerv3 Linux - Networking 3 01-24-2003 06:54 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:24 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration