Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Where I work we have a lan, it is almost 100% windows machines except for 2 CentOS machines in which some clients connect to, via VPN. (very small network, <50 ip's used)
I would like to know if there is a way to block access from that machines to others in the network.
I'm already logging traffic (with IPTraff) to see if they're accessing other machines in the network others than the ones they should connect.
which machines are you trying to block and from where ?
I want to block the linux machines inside our network from acessing other machines on our network except those they must access (2 or 3 machines).
The problem is that our clients connect to those CentOS machines through VPN and they have access to all of our network. I want to limit them to only the machines they have to connect for working.
No, i don't think it's possible for now. All because they need to work inside our network and with machines(mainly printers) that we work with too. We can't isolate the resources.
They connect to those CentOS machines, and they need to connect to more machines inside of our network (mainly printers and one or two more computers). But, since they connect through VPN they have an internal ip and can access all network.
Ahh, and our network is workgroup based, not domain. Maybe that'll change in the upcoming months but i don't know when.
Which internal ip addresses do they get ? If you can safely block anything coming from a local ip in the centos boxes then it should be quite straight forward.
iptables -A OUTPUT -o eth0 -p all -d xxx.xxx.xxx.xxx -j ACCEPT
iptables -A OUTPUT -o eth0 -p all -d yyy.yyy.yyy.yyy -j ACCEPT
iptables -A OUTPUT -o eth0 -p all -d zzz.zzz.zzz.zzz -j ACCEPT
iptables -A OUTPUT -o eth0 -p all -j REJECT
xxx.xxx.xxx.xxx is an allowed destination, as is yyy and zzz.
those rules must come before the reject rule if they are to work.
Make sure the correct outgoing ethX name is used, and the correct ip addresses to allow.
The problem lies in allowing outgoing traffic back over the VPN.
Do the centos boxes have separate ethernet ports for internal and external networks ?
Which internal ip addresses do they get ? If you can safely block anything coming from a local ip in the centos boxes then it should be quite straight forward.
iptables -A OUTPUT -o eth0 -p all -d xxx.xxx.xxx.xxx -j ACCEPT
iptables -A OUTPUT -o eth0 -p all -d yyy.yyy.yyy.yyy -j ACCEPT
iptables -A OUTPUT -o eth0 -p all -d zzz.zzz.zzz.zzz -j ACCEPT
iptables -A OUTPUT -o eth0 -p all -j REJECT
xxx.xxx.xxx.xxx is an allowed destination, as is yyy and zzz.
those rules must come before the reject rule if they are to work.
Make sure the correct outgoing ethX name is used, and the correct ip addresses to allow.
The problem lies in allowing outgoing traffic back over the VPN.
Do the centos boxes have separate ethernet ports for internal and external networks ?
Thanks, i will try that.
Last edited by nothing_pt; 04-26-2010 at 09:02 AM.
Reason: forgot to answer question
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.