LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 05-13-2004, 11:54 AM   #1
otisthegbs
Member
 
Registered: May 2003
Location: Vancouver
Distribution: RH9
Posts: 100

Rep: Reputation: 15
Restricting internal LAN users access


So I just completed my first custom firewall, and will the help of an excellent PDF, I must say I'm quite impressed. But unfortunatly my next task is not covered in my firewal bible. I want to be able to completely restrict all the internal users from seeing each other, no pings, no tcp, nothing. How do I do this? Is it with IPTABLES? and if so how?
 
Old 05-13-2004, 12:53 PM   #2
g_goblin
Member
 
Registered: Oct 2002
Location: Chitown
Distribution: RH 7.2/3
Posts: 48

Rep: Reputation: 15
a firewall restricts access from network to network. i don't see how it would be able to restrict access between two computers on the same subnet.
 
Old 05-13-2004, 12:59 PM   #3
otisthegbs
Member
 
Registered: May 2003
Location: Vancouver
Distribution: RH9
Posts: 100

Original Poster
Rep: Reputation: 15
OK, I see

Ok, so, how would I come up with a way of restricting those users from accessing each other?
 
Old 05-13-2004, 04:05 PM   #4
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
You need iptables and a firewall script on each machine to do that I believe.

A quick and dirty way to disallow all pings is:
Code:
/bin/echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_all
 
Old 05-13-2004, 05:58 PM   #5
otisthegbs
Member
 
Registered: May 2003
Location: Vancouver
Distribution: RH9
Posts: 100

Original Poster
Rep: Reputation: 15
That won't do for my situation, the clients on the network will change every day.
 
Old 05-14-2004, 01:41 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
I want to be able to completely restrict all the internal users from seeing each other, no pings, no tcp, nothing.
What's the purpose is of doing that?
 
Old 05-14-2004, 07:26 AM   #7
manya
Member
 
Registered: Apr 2004
Posts: 194

Rep: Reputation: 15
resrictive firewall

hey it s too easy

there are 2 ways 2 perform this task

one way is you can block ping by putting rule in firewall linkethis

iptables -A FORWARD -p icmp --icmp-type echo-request -j DROP

or

the way u got an answer i mean in edidting in sysctl.conf file


also if u want to block all the traffic from different lan, the way is
make ur firewall restricitve by putting default policy to DROP

iptables -P FORWARD DROP
 
Old 05-14-2004, 01:10 PM   #8
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
What was the PDF you found, if I may ask?

-- Poetics
 
Old 05-15-2004, 02:26 PM   #9
otisthegbs
Member
 
Registered: May 2003
Location: Vancouver
Distribution: RH9
Posts: 100

Original Poster
Rep: Reputation: 15
K, so Ill explain it a bit further. I DONT want to have users in ONE subnet to be able to see each other with pings tcp udp, nothing. Now, I already figured out that this is NOT going to happen in the same subnet. So what I did was created around 200 virtual networks and assigned each user their own subnet ie:

192.168.1.3
192.168.2.3
192.168.3.3
192.168.4.3

and then told iptables that no virtual ethernet cards (eth1:1 eth1:2 eth1:3) could talk to each other. but every one could talk to eth1 (the router) and the router could talk to every one.

oh, and dude, the pdf i found is killer, its a 896 page pdf document on securing your linux box, its just nuts the iptables stuff is around page 196
heres the link

http://www.tldp.org/LDP/solrhe/Secur...ution-v2.0.pdf

its dope man, just dope!, oh hey, if anyone's got an idea on how to exploit my multiple subnet network to see other users (aside from manually configuring your ip, or if you have an idea on how to curcumvent this) LEMME KNOW!!!
 
Old 05-15-2004, 02:54 PM   #10
Rick485
Member
 
Registered: Sep 2003
Location: Arizona
Distribution: Kubuntu 8.04
Posts: 202

Rep: Reputation: 30
I am no expert on any of this and was wondering how you created the virtual ethernet cards? Are you using VMWare or something like that to create the virtual ethernet cards? I use VMWare on my home computer by the way.

It seems to me that much the same thing could be accomplished on a real router. You could use a subnet mask that creates the smallest possible size subnets and then place everyone on a seperate subnet. For instance, suppose you have a class C address with a subnet mask of 255.255.255.254. If I am not mistaken you would then have 252 useable networks with 2 useable IP addresses per subnet. Of course, to communicate between each subnet they would need to go through a router. The router could use access control lists to control access to each port in either direction.

VLANs would also accomplish much the same thing. I assume you are using an ethernet network with a star topology. Suppose you replaced your hubs or switches with switches that support the creation of VLANs. You could then create very small VLANs with only one or several users per VLAN. To communicate between each VLANs you would need to go through a router. The access control list on the router could be used to control things. If both the switch and the router support trunking you would only need one cable between each switch and the router. By the way packets to not leak between VLANs.

I am not a network administrator or anything like that so what I have just suggested may or may not be practical or correct. I hope I am not way over my head on this subject. I do not know enough about security to know how to exploit any of these.
 
Old 05-15-2004, 04:15 PM   #11
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
K, so Ill explain it a bit further (...) talk to every one.
I'm still wondering hat's the purpose of doing that? What makes you think you need this?
 
Old 05-16-2004, 06:33 PM   #12
otisthegbs
Member
 
Registered: May 2003
Location: Vancouver
Distribution: RH9
Posts: 100

Original Poster
Rep: Reputation: 15
UnSpawn: dude! i want to make a network where no one can ping/connect/see nothing anyone else. and Rick485 you pretty much hit the nail on the head, thats exactly what i'm doing, with the exception of the switch to support vlans im just making virtual ethernet card with redhat-config-network ie eth1 192.168.1.1 eth1:1 192.168.2.1 eth1:2 192.168.3.1 and so on. then on each subnet there is a 192.168.x.3 address for the client. then the firewall is configed so that eth1 can see all subnets but all subnet can ONLY see eth1
 
Old 05-16-2004, 06:37 PM   #13
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
I'm still with unSpawn with this -- otis, you've mentioned what you want, but the key question is why is this so important if everyone's on the same network?

I mean, what's the point of networking in this instance?
 
Old 05-16-2004, 09:13 PM   #14
otisthegbs
Member
 
Registered: May 2003
Location: Vancouver
Distribution: RH9
Posts: 100

Original Poster
Rep: Reputation: 15
why is this so important if everyone's on the same network?

Because i dont want them to see each other! I've said this three times now. I don't want to sound like a dink, but read the posts! I figure that if I put everybody on a diffefent subnet , and then restrict subnet access through the firewall, then they wont be able to see each other.
 
Old 05-16-2004, 11:22 PM   #15
zack3g
LQ Newbie
 
Registered: May 2004
Location: Manila, Philippines
Distribution: Parrot on a MSI Laptop
Posts: 27

Rep: Reputation: 15
Quote:
Originally posted by Poetics
I'm still with unSpawn with this -- otis, you've mentioned what you want, but the key question is why is this so important if everyone's on the same network?

I mean, what's the point of networking in this instance?


Precisely. I thought the main idea behind having a network is to have the computers be able to communicate with each other. But, I can see how this would be used in some instances. For example, you have the router acting as a gateway to XXXX(internet, other wan), and you are doing some rather high security stuff on these computers, and want them only to be able to access XXXX, and not communicate between each other. That would really be the only point of having it anyways, because if they aren't needing to get out elsewhere, why not just have them as stand alone machines?

Who knows, maybe this dude is just one of those people who does things not because he needs to, but because he thinks he can, or simply wants to see if it can be done. Anyhow, I think it would be a waste of well, just about everything to even attempt this, but hey if that's his thing, let him run with it.
 
  


Reply



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
[Proftpd] Internal (LAN) access capped at 2MB/S? joekr Linux - Networking 4 07-10-2005 05:49 PM
How to gain access internal LAN Using OpenVPN? ltam68 Linux - Networking 2 06-23-2005 08:32 PM
Restricting su to certain users roadin SUSE / openSUSE 4 03-15-2005 12:17 PM
I need my LAN users to access the internet using automatic configuratin script on RH9 akohamen Linux - Networking 1 04-20-2004 03:09 PM
LAN internal mailserver no internet access guanyu Linux - Networking 8 11-14-2002 11:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 10:30 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration