Linux Netfilter discussions
 help / color / mirror / Atom feed
* A Humble Proposal
@ 2003-09-24 10:57 John A. Sullivan III
  0 siblings, 0 replies; 9+ messages in thread
From: John A. Sullivan III @ 2003-09-24 10:57 UTC (permalink / raw)
  To: netfilter

	What an interesting project! Perhaps nufw and ISCS
(http://iscs.sourceforge.net) can share some ideas.  ISCS plans to
support the dynamic creation of iptables rules based upon LDAP, AD, NDS,
SecureID and RADIUS in version 2.x.  It currently supports the dynamic
creation of iptables rules based upon the fields of a user's X.509
digital certificate.  The scripts to make this happen on the enforcement
device are in the project CVS but we are still building the
administrative interface.  In fact, we may be looking to hire a few
developers to accelerate this process.  Please feel free to use the
scripts if they are of help - John
-- 
John A. Sullivan III
Chief Technology Officer
Nexus Management
+1 207-985-7880
john.sullivan@nexusmgmt.com
---
If you are interested in helping to develop a GPL enterprise class
VPN/Firewall/Security device management console, please visit
http://iscs.sourceforge.net 

> I have seen some of this functionality in Checkpoint, and I think
that> it would be immensely useful in the iptables community if it is
adopted.
NuFW provides these sort of things :
  http://www.nufw.org
Code can be considered has beta code. It works but things need to be
done (especially a Windows Client ;-).
With NuFW, you really filter by User (Group) and not by IP as it often
the case.




^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: A Humble Proposal
@ 2003-09-26 11:53 John A. Sullivan III
  0 siblings, 0 replies; 9+ messages in thread
From: John A. Sullivan III @ 2003-09-26 11:53 UTC (permalink / raw)
  To: netfilter

	I can certainly appreciate the desire to do this and it would be most
helpful for us in the ISCS project but there are some significant
hurdles if I correctly understand what you desire.
	I will be delighted to be wrong on this subject so, if someone sees a
better way, please correct me.  In ISCS (http://iscs.sourceforge.net),
we have been very interested in out-of-band authentication.  As far as I
know, all we consistently have to identify a user when the packet comes
in (in-band authentication) is the IP address.  How do we associate some
other kind of user authentication with this packet stream?
	We have been able to successfully use out-of-band authentication with
X.509 certs because we associate them with a specific tunnel using
FreeS/WAN (http://www.freeswan.org) and the X.509 patch
(http://www.strongsec.com).  When the IPSec session is initiated, we
capture the various fields of the cert (actually the fields in the
passed DER_ASN.1_DN ID) and the issuing CA.  We compare these against a
list of user groups associated with those fields (wildcards are allowed
in the security definitions so that we don't have to define every
specific user - just groups of users).  We then dynamically create rules
in the FORWARD or INPUT chains to jump the associated IP addresses to
the chains that contain the rules for those groups.  When the IPSec
session is torn down, we dynamically delete those chain jump rules.
	This is relatively safe against spoofing since we look for the traffic
coming off the ipsec interface.  It can't get to that interface unless
it has been authenticated in the IPSec tunnel creation and we will not
have two identical IPSec sessions with the same IP address.
	Other forms of out-of-band authentication are much more difficult.  We
have examined two approaches. One is to have a user application handle
it and the request for the authentication comes from the gateway.  The
other is to have the user initiate the authentication via something like
a Java app running in a browser.
	We found the first approach highly problematic.  It involves the
creation, distribution and maintenance of an OS specific application. 
The mechanism creates firewall problems.  Basically, the data packet
arrives at the gateway and the gateway sees if it has any rules to allow
the packet.  If it does not, it initiates a conversation with the
application running on the user's computer to ask for any other means of
identification.  Since the stream is initiated by the gateway, the
request is blocked if the user is behind a firewall that does not
(wisely) allow such inbound initiated streams.
	The user authentication method is much friendlier that way.  The data
stream is initiated by the user before sending any data packets and it
can run in any browser on any platform (theoretically!). However, we
have not yet set our minds to working around the spoofing problem.  Once
a user's IP address has been cached against that ID, in other words -
the dynamic iptables rules have been created based upon the
authentication and are checking packets on the physical interface, what
is to prevent another user from spoofing that address and obtaining the
same security clearance?
	My understanding from some of the major vendors who have implemented
this kind of out-of-band authentication is that they are subject to
spoofing attacks and it is an imperfect science.
	It would be wonderful if this could be in the state table but since the
authentication is a different data stream than the service data request,
how would it be associated? What happens when the user wishes to access
a different service, e.g., they first check their e-mail and then wish
to access the Human Resources web server? I,too, would love the ability
to do this but I see it as quite a challenging proposal.  Good luck to
all those working on it - John
-- 
John A. Sullivan III
Chief Technology Officer
Nexus Management
+1 207-985-7880
john.sullivan@nexusmgmt.com
---
If you are interested in helping to develop a GPL enterprise class
VPN/Firewall/Security device management console, please visit
http://iscs.sourceforge.net 



^ permalink raw reply	[flat|nested] 9+ messages in thread
* RE: A humble proposal
@ 2003-09-26  0:19 Daniel Chemko
  2003-09-26  7:21 ` Eric Leblond
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Chemko @ 2003-09-26  0:19 UTC (permalink / raw)
  To: firewalldude; +Cc: netfilter, netfilter-devel

I had a thought about this, and I see a lot of work taking this
approach.

How about this:

Write a jump target that applies only inside the filter table, since the
first revision would just implement filtering control.

The module itself would be initialized by a userspace tool be adding
rules. An example would be:

iptables -I INPUT -m expire --expire-condition timer=6000 --expire-id
12123124325 --source 192.168.1.1/24 -j ACCEPT
iptables -I OUTPUT -m expire --expire-condition timer=6000 --expire-id
12123124326 --destination 192.168.1.1/24 -j ACCEPT

Since they are inserted in these tables, they should be called before
ESTABLISHED,RELATED is even hit.

The jump determines if the packets are valid any longer. The problems
that I can see here are:

- The rule itself needs to be cleared out of the chain once it is
expired. I could get the daemon to do some housekeeping, but it'd be
better if the jump module could clean up its own reference. Can this be
done?

- The CONNTRACK entries for the allowed sessions are not dropped. Once
again, it would be nice if the jump module could clean up the CONNTRACK
entry.


-----Original Message-----
From: Joel Newkirk [mailto:firewalldude@newkirk.us] 
Sent: Tuesday, September 23, 2003 2:10 PM
To: Daniel Chemko
Cc: netfilter@lists.netfilter.org; netfilter-devel@lists.netfilter.org
Subject: Re: A humble proposal

On Tue, 2003-09-23 at 12:13, Daniel Chemko wrote:
> I have been researching some possible extensions to the Netfilter
> environment, and something has become very necessary for my current
> environment. The following proposal outlines what I wish to implement.
I
> am wondering if anyone would find value in this. Plus, I look forward
to
> feedback so that I may improve my ideas.


> Suggestion:
> 
> I would like to take pam_iptables and expand it beyond its simple
> structure. Features will include:

My humble suggestion would be that this should be handled in the
stateful
connection tracking - If a session is authenticated and certain
connections
are to be allowed, then the new allowed connections would be of state 
"related".  Really handy would be the ability to distinguish these
particular
'related' connections and feed them through specific chains.  I for one 
would NOT want to simply open the box (or network) wide for every
authenticated 
connection, but would like to be able to specify a different set of
(more 
permissive) rules for them once authenticated.  Perhaps patch an
additional
state - "PAM" or "AUTH".  Or the ability to specify a fwmark that is
automatically implemented for RELATED traffic to the authenticated
session,
allowing different chains to be traversed based on the mark found.

j




^ permalink raw reply	[flat|nested] 9+ messages in thread
* A humble proposal
@ 2003-09-23 16:13 Daniel Chemko
  2003-09-23 16:39 ` Eric Leblond
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Daniel Chemko @ 2003-09-23 16:13 UTC (permalink / raw)
  To: netfilter, netfilter-devel

I have been researching some possible extensions to the Netfilter
environment, and something has become very necessary for my current
environment. The following proposal outlines what I wish to implement. I
am wondering if anyone would find value in this. Plus, I look forward to
feedback so that I may improve my ideas.


Problem:

When you need to have internet services open to the internet, some of
them are inherently insecure, such as FTP, SMB, etc. Even if the
protocols have built in encryption, there is still a chance that the
protocol can be compromised.

Also, I have a VPN connection into my internal network. I want anyone
connecting to be forced to authenticate to access mission-critical
components of the system, keeping them safe unless the user themselves
need to do emergency work on these servers.

Related:

While looking into PAM support for various Hardware Tokens, I can
across, pam_iptables. This allows one to login to a SSH, Telnet, or
whatever PAM supported daemon is installed with the module. Once
authenticated, the user has full TCP/IP access to the machine. Once the
SSH session has been closed, so does the iptables rule for access to the
system.

Suggestion:

I would like to take pam_iptables and expand it beyond its simple
structure. Features will include:

- Getting rid of the requirement to keep SSH open the whole time
- Create a daemon that keeps track of the sessions, instead of worrying
about the lifetime of the PAM session
- Allow iptables or any command to be executed once successful
authentication has occurred
- Customize the executed commands based on user/groups to give more fine
grained control over who has what protocol access
- Ability to expire sessions based on:
	- Upload/Download Quotas
	- Time in the system
	- Time idling on all services
	- Line Hang-up (VPN disconnect)
	- Other events that I can't think up on the spot

Since PAM returns the originating IP address of the request, most of the
rule functionality can be used to discriminate on a host level. I don't
think many people would have a problem with this. The only side effect
here is that a user behind a NAT'd network accessing the system opens
the services to everyone behind that host. This is unavoidable.

I have seen some of this functionality in Checkpoint, and I think that
it would be immensely useful in the iptables community if it is adopted.



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-10-02 21:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-24 10:57 A Humble Proposal John A. Sullivan III
  -- strict thread matches above, loose matches on Subject: below --
2003-09-26 11:53 John A. Sullivan III
2003-09-26  0:19 A humble proposal Daniel Chemko
2003-09-26  7:21 ` Eric Leblond
2003-09-23 16:13 Daniel Chemko
2003-09-23 16:39 ` Eric Leblond
2003-09-23 21:10 ` Joel Newkirk
2003-10-02 19:51 ` Harald Welte
2003-10-02 21:26   ` Eric Leblond

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox