View previous topic :: View next topic |
Author |
Message |
mirt n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 01 Apr 2004 Posts: 1
|
Posted: Thu Apr 01, 2004 12:15 am Post subject: setup linux gateway + firewall (redhat 9.0) |
|
|
Hello, I need to setup a linux gateway for a lan-party. Offcourse we need to use Iptables.
More details:
we have 3 ranges : 192.168.1.0/16 (Servers) , 192.168.2.0/16 (admins), 192.168.3.0/16(gamers)
Server range : 6000:7000 tcp closed
Admin range : all open
Gamers range: all closed accept 5190tcp,4000tcp
For each user we have to know the amount of datatransfer. (just need to be shown on the screen, nothing advanced)
Are there people who can help me?
Thx a lot !! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
nikolei n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/gallery/Southpark/avatar32.gif)
Joined: 15 Dec 2003 Posts: 37
|
Posted: Fri Apr 02, 2004 11:07 am Post subject: |
|
|
hi
network 1 (servers): 192.168.1.0/24
network 2 (admins): 192.168.2.0/24
network 3 (gamers): 192.168.3.0/24
gateway has 3 nics with ipadresses (for example): 192.168.1.1, 192.168.2.1, 192.168.1.3
1) you have to set the routes to all networks for all machines. gateway adress is always the ip adress of the gateway within the subnet.
2) compile iptables and routing into the kernel
3) aktivate routing with:
echo "1" > /proc/sys/net/ipv4/ip_forward
4) tell your filewall to forward packages:
iptables -A FORWARD -j ACCEPT
5) configure your firewall filtes as you need them
thats all
the data transfer per user is easy to get if you do it on a per ip adress basis.
just ask google or freshmeat. there are a lot of programs around, that can do the job.
or if you like writing, you can implement one firewall rule perl user/ip-adress and wath the traffic via:
iptables -L -v
but after a limit of bytes trasfered, netfilter will reset the counter, so it it not very suited for a lan party.
nikolei |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|