LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 10-22-2003, 03:04 PM   #1
ivanatora
Member
 
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
beolach
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

Quote:
# local interface, local machines, going anywhere is valid
#
$IPTABLES -A INPUT -i $INTIF -s $INTNET -d $UNIVERSE -j ACCEPT
to only allow specific hosts:
Quote:
# 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,
Beolach
 
Old 10-23-2003, 03:09 AM   #3
ivanatora
Member
 
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
ivanatora
Member
 
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 www.linuxpackages.net . 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...
 
  


Reply


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


All times are GMT -5. The time now is 04:40 PM.

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