[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: help on masquerading



Ritesh Raj Sarraf wrote:

Hello all,
I have a masquerading server with 2 ethernet cards, eth0(202.52.x.x) to the internet and eth1(192.168.100.x) to my local network customers. I've enabled nat and my customers are able to browse the internet well (My customer are cyber cafe owners). I've limited their bandwidth. The issue is that I've limited their bandwidth on ipbasis ( say 192.168.100.6 is assigned 64kbps). My view is that they can change their ip to something else (say 192.168.100.15) and consume full bandwidth because i've not limited or given more bandwidth to that particual ip.

To accomplish my condition, I thought of:

#iptables -P FORWARD DROP
To disable all packet forwarding by default.
and then

#iptables -A FORWARD -s 192.168.100.6 -i eth1 -j ACCEPT
To allow my that particular ip to access the net.

But after this command the customer isn't able to browse the net. He's still able to ping my masquerading server. Where am i wrong and what could be a solution ? Please help !

I also think my approach to be insufficient. Because still my customer with ip (192.168.100.6) can connect to the net if he changes the ip to my some other customers ip (192.168.100.15), say if his machine is shutdown at that time.

Is there a better approach ?
Any reply will be greatly appreciated.

You didn't say whose machines they are nor what OS they're running. If they're yours you can lock them down so the users can't do those things.

You can run arpwatchd which will email ou whenever a new host arrives on your LAN and whenever anyone changes IP.

You can configure DHCPD to serve out IP addresses, require all your clients to use DHCP. In your configuration you can hard-code IP addresses for everyone who's authorised to connect and use a dynamic range for everyone else. You may choose to not route them outside the LAN, give them IP addresses on a different subnet (they're all on the same wire) and generally be devious, even to regularly changing the allowed IP addresses!

Google for pebble and nocat. They're wireless kit, but probably useful to you to. Their purpose is to provide public Internet access and require everyone to be authenticated. In a free (gratis) environment, people can decline authentication and be authenticated as anonymous, with different access rights.

From what you have said, that could suit you very well. Especially if you (want to) allow people to bring their wirelss laptops.



Ritesh




--

Cheers
John

-- spambait
1aaaaaaa@computerdatasafe.com.au  Z1aaaaaaa@computerdatasafe.com.au



Reply to: