Sponsored Content
Operating Systems Linux Red Hat Block an IP for a subnet by iptables Post 302898938 by rbatte1 on Friday 25th of April 2014 05:05:15 AM
Old 04-25-2014
Although I've not used this yet, but will be doing so shortly, I would think that the logic should be to deny everything as default then just allow what you want to come in.



Robin
 

3 More Discussions You Might Find Interesting

1. Cybersecurity

iptables: block/allow ftp

I have 2 LAN's, seperated by a firewall, running iptables on it. I want only allow ftp access from one to the other LAN. Server 1 in LAN 1 should have ftp access to Server 2 in LAN 2 Server 2 in LAN 2 should not have ftp access to Server 1 in LAN 1. Can someone tell me how to set up the... (5 Replies)
Discussion started by: sTorm
5 Replies

2. IP Networking

Migrating existing Subnet to a new subnet and changing ip addresses in UNIX

Hi, My project needs to migrate the existing Subnet (255.255.255.0) to a new subnet and change the ipaddresses (currently C class). How can I do that. I need some information. John (0 Replies)
Discussion started by: johnmarsh
0 Replies

3. Linux

How to block only one IP using iptables?

Hi friends, I have a linux machine without iptables running and we have a new requirement to block a remote machine ( IP = 172.1.1.1 ) completely accessing our linux machine in both directions. So I need to allow "everything" except that IP address. So i tried below: If I set the below in... (3 Replies)
Discussion started by: magnus29
3 Replies
Apache2::SiteControl::Rule(3pm) 			User Contributed Perl Documentation			   Apache2::SiteControl::Rule(3pm)

NAME
Apache2::SiteControl::Rule - Permission manager access rule. DESCRIPTION Each rule is a custom-written class that implements some aspect of your site's access logic. Rules can choose to grant or deny a request. package sample::Test; use strict; use warnings; use Carp; use Apache2::SiteControl::Rule; use base qw(Apache2::SiteControl::Rule); sub grants($$$$) { my $this = shift; my $user = shift; my $action = shift; my $resource = shift; if($action eq "edit" && $resource->isa("sample::Record")) { return 1 if($user{name} eq "root"); } return 0; } sub denies($$$$) { return 0; } 1; The PermissionManager will only give permission if at least one rule grants permission, and no rule denies it. It is important that your rules never grant or deny a request they do not understand, so it is a good idea to use type checking to prevent strangeness. Assertions should not be used if you expect different rules to accept different resource types or user types, since each rule is used on every access request. EXPORT
None by default. SEE ALSO
Apache2::SiteControl::UserFactory, Apache::SiteControl::ManagerFactory, Apache2::SiteControl::PermissionManager, Apache::SiteControl AUTHOR
This module was written by Tony Kay, <tkay@uoregon.edu>. COPYRIGHT AND LICENSE
perl v5.14.2 2006-03-17 Apache2::SiteControl::Rule(3pm)
All times are GMT -4. The time now is 07:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy