Beginning of a journey...
Moderator: General Moderators
Beginning of a journey...
Hello All,
This is my very first post in this forum and also my very first post on this journey I'm going to embark upon.
For many years I have been a windows developer primariliy as a database and web programmer but recently moved into software programming; however I've hit a dead end...
For some time I have wanted to program a network gateway, initially I wanted to do it just for fun, but now the company I work for is moving into internet provision and I see the idea's I had for a gateway something that would suit what they wanted.
So I'm embarking on a journey to reach my goal and develop an internet gateway, but not using the windows platform but rather using linux; the problem is, I have no idea where to start. My experience with linux is very limited (I can install a linux distro and get basic functionality running but that's about the end of it).
From what I've been able to glean so far, I'm going to need to program in C++ and be able to modify the linux version of the ip stack. I'll list below the features that I'm wanting to program into the gateway.
My hope is that someone on this board will be able to give me some starting points, url's or examples that might get me going.
A big thanks in advance for any help you can offer.
Anubis.
Ideal Features:
- Act as internet gateway for private lan clients on a public wan
- Handle one WAN interface and up to 8 LAN interfaces with internal routing
- Translate private NAT addresses to public WAN and vice-versa
- Control the clients upload and download bandwidth (optionally with burstablility)
- Control the clients upload and download volume (optionally with bandwidth limit reduction once exceeded)
- Control the clients connectivity based on time
- Authenticate clients by MAC address, IP address, by a 'built-in' web redirection authentication or by PPPoE
- Include a basic QoS to prioritise HTTP/HTTPS over torrents for example.
This is my very first post in this forum and also my very first post on this journey I'm going to embark upon.
For many years I have been a windows developer primariliy as a database and web programmer but recently moved into software programming; however I've hit a dead end...
For some time I have wanted to program a network gateway, initially I wanted to do it just for fun, but now the company I work for is moving into internet provision and I see the idea's I had for a gateway something that would suit what they wanted.
So I'm embarking on a journey to reach my goal and develop an internet gateway, but not using the windows platform but rather using linux; the problem is, I have no idea where to start. My experience with linux is very limited (I can install a linux distro and get basic functionality running but that's about the end of it).
From what I've been able to glean so far, I'm going to need to program in C++ and be able to modify the linux version of the ip stack. I'll list below the features that I'm wanting to program into the gateway.
My hope is that someone on this board will be able to give me some starting points, url's or examples that might get me going.
A big thanks in advance for any help you can offer.
Anubis.
Ideal Features:
- Act as internet gateway for private lan clients on a public wan
- Handle one WAN interface and up to 8 LAN interfaces with internal routing
- Translate private NAT addresses to public WAN and vice-versa
- Control the clients upload and download bandwidth (optionally with burstablility)
- Control the clients upload and download volume (optionally with bandwidth limit reduction once exceeded)
- Control the clients connectivity based on time
- Authenticate clients by MAC address, IP address, by a 'built-in' web redirection authentication or by PPPoE
- Include a basic QoS to prioritise HTTP/HTTPS over torrents for example.
Re: Beginning of a journey...
I'll give you some directions and man pages. If you have difficulties implementing it, ask again 
Search for SNAT target.
Well, it's quite a huge manual. I suggest you to use some ready-to-use scripts.
I've written one: http://openfmi.net/frs/?group_id=187
It's for managing access and bandwidth control over several C-class subnets.
Search for time match.
Search for mac match.
or
Or just install a PPPoE server - google it.
Anubis08 wrote:- Act as Internet gateway for private lan clients on a public wan
Handle one WAN interface and up to 8 LAN interfaces with internal routing
Code: Select all
man ifconfig
man routeAnubis08 wrote:- - Translate private NAT addresses to public WAN and vice-versa
Code: Select all
man iptablesAnubis08 wrote:- Control the clients upload and download bandwidth (optionally with burstablility)
- Control the clients upload and download volume (optionally with bandwidth limit reduction once exceeded)
Code: Select all
man tcI've written one: http://openfmi.net/frs/?group_id=187
It's for managing access and bandwidth control over several C-class subnets.
Anubis08 wrote:- Control the clients connectivity based on time
Code: Select all
man iptablesAnubis08 wrote:- Authenticate clients by MAC address, IP address, by a 'built-in' web redirection authentication or by PPPoE
Code: Select all
man iptablesor
Code: Select all
man ipsetThe "tc" tool has everything to do whatever QoS you need.Anubis08 wrote:- Include a basic QoS to prioritise HTTP/HTTPS over torrents for example.
There are 10 types of people in this world, those who understand binary and those who don't
Re: Beginning of a journey...
Hello VladSun,
Thank you for the prompt reply. Do you have any recommendation of which linux distro to start from? I am currently using Ubuntu server 8.0 to host a provider built pay-tv service but this only required me to install ubuntu and install the service and start it.
I have also tried to install Ubuntu desktop 7.0 on my laptop but had great difficulty getting my wireless lan active.
To view the man's you gave, do I need the server edition or the client?
Thank very much for your help, I'm quite excited to be getting into this finally!
Anubis.
Thank you for the prompt reply. Do you have any recommendation of which linux distro to start from? I am currently using Ubuntu server 8.0 to host a provider built pay-tv service but this only required me to install ubuntu and install the service and start it.
I have also tried to install Ubuntu desktop 7.0 on my laptop but had great difficulty getting my wireless lan active.
To view the man's you gave, do I need the server edition or the client?
Thank very much for your help, I'm quite excited to be getting into this finally!
Anubis.
Re: Beginning of a journey...
For this type of server (i.e. router/traffic shaper) a lot of people recommend using *BSD.
But I've never worked with *BSD OS.
I would advice you to use Slackware (because you'll need patched kernels, iptables, etc.), but it's not so user friendly, as Debian and Ubuntu are. And you are a new to Linux ...
So, maybe it would be best to use Debian (without anything but the core system).
To view the man pages, you don't need a Linux distro - use google. E.g.: man page iptables

Good luck and welcome to Linux world
But I've never worked with *BSD OS.
I would advice you to use Slackware (because you'll need patched kernels, iptables, etc.), but it's not so user friendly, as Debian and Ubuntu are. And you are a new to Linux ...
So, maybe it would be best to use Debian (without anything but the core system).
To view the man pages, you don't need a Linux distro - use google. E.g.: man page iptables
Good luck and welcome to Linux world
There are 10 types of people in this world, those who understand binary and those who don't
Re: Beginning of a journey...
Hello VladSun,
Thank you again very much, you've been extremly helpful! I'm sure it'll take me a few days to pour over the information but this is a great start.
Thanks
Anubis.
Thank you again very much, you've been extremly helpful! I'm sure it'll take me a few days to pour over the information but this is a great start.
Thanks
Anubis.
Re: Beginning of a journey...
I'm pretty sure you'll have some questions and I'll be happy to help you solving them. I do love LARTC 
By the way - google for "LARTC" also
By the way - google for "LARTC" also
There are 10 types of people in this world, those who understand binary and those who don't
Re: Beginning of a journey...
Hello VladSun,
I've been reviewing the information and I've managed to locate most of the manuals, but I cannot find a complete 'tc' manual. Do you know where I could get a complete manual (aside from inside linux)?
Also, you've mentioned about the PPPoE to install another server, could you clarify this or give more info?
Thanks
Anubis.
I've been reviewing the information and I've managed to locate most of the manuals, but I cannot find a complete 'tc' manual. Do you know where I could get a complete manual (aside from inside linux)?
Also, you've mentioned about the PPPoE to install another server, could you clarify this or give more info?
Thanks
Anubis.
Re: Beginning of a journey...
http://linux.die.net/man/8/tc
+ "See also" section
http://www.roaringpenguin.com/products/pppoe
And the most important link:
http://lartc.org/howto/
+ "See also" section
http://www.roaringpenguin.com/products/pppoe
And the most important link:
http://lartc.org/howto/
There are 10 types of people in this world, those who understand binary and those who don't