Networking Forums

Networking Forums > Computer Networking > Linux Networking > Policy Enforcment on linux

Reply
Thread Tools Display Modes

Policy Enforcment on linux

 
 
Eric Freeman
Guest
Posts: n/a

 
      11-11-2004, 07:21 PM
I am trying to enforce the security policy where I can allow only
connections through certain ports listed in a file.

The file will contain a port number on each line, followed by in, out
or both. in indicates that inbound connections should be allowed on
that port, out permits outbound connections, and both will permit
bidirectional connectivity. The default policy should be to block. In
other words, unless a port is explicitly mentioned in the file, it
should deny access to it from both directions. For each port
explicitly mentioned in the policy file, log the allowed/denied
statistics.
I also have to block the list of IP addresses provided in a file.
Where I have to refuse any HTTP access to those sites, no matter what
the above mentioned file says.

I am sure I have to look into tcp_v4_rcv function, and the connect
system call, but was unable to follow it.

I would appericiate any help in this subject.

Thanks,
Eric Freeman
 
Reply With Quote
 
 
 
 
Sundial Services
Guest
Posts: n/a

 
      11-11-2004, 07:26 PM
Eric Freeman wrote:
> I am trying to enforce the security policy where I can allow only
> connections through certain ports listed in a file.
> The file will contain a port number on each line, followed by in, out
> or both. in indicates that inbound connections should be allowed on
> that port, out permits outbound connections, and both will permit
> bidirectional connectivity. The default policy should be to block. In
> other words, unless a port is explicitly mentioned in the file, it
> should deny access to it from both directions. For each port
> explicitly mentioned in the policy file, log the allowed/denied
> statistics.
> I also have to block the list of IP addresses provided in a file.
> Where I have to refuse any HTTP access to those sites, no matter what
> the above mentioned file says.
>
> I am sure I have to look into tcp_v4_rcv function, and the connect
> system call, but was unable to follow it.
>
> I would appericiate any help in this subject.



Sounds like iptables to me.

Best tool I've seen for that is "shorewall." http://www.shorewall.net

It generates iptables rules, and while it's a bit tricky to set up it's very
well-documented and can handle a lot of configurations. Free of course.

 
Reply With Quote
 
Bill Unruh
Guest
Posts: n/a

 
      11-11-2004, 08:40 PM
(E-Mail Removed) (Eric Freeman) writes:

]I am trying to enforce the security policy where I can allow only
]connections through certain ports listed in a file.

]The file will contain a port number on each line, followed by in, out
]or both. in indicates that inbound connections should be allowed on
]that port, out permits outbound connections, and both will permit
]bidirectional connectivity. The default policy should be to block. In

This is called a firewall. Why are you reinventing the wheel?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cant locate wireless network policy in group policy Tom Windows Networking 0 05-11-2005 01:28 PM
Samba file timestamp policy with Linux client .vs. Windows client Richard Conway Linux Networking 2 03-05-2004 07:49 AM
Red Hot Linux v9.0 [2 DVDs]. Red Hot Linux v9.0 [3 CDs]. Redhat Enterprise Linux ES v3.0 REPACK [4 CDs]. Mandrake Linux 9.2 [3 CDs] -new ! TEL Linux Networking 0 12-01-2003 12:06 PM
Red Hot Linux v9.0 [2 DVDs]. Red Hot Linux v9.0 [3 CDs]. Redhat Enterprise Linux ES v3.0 REPACK [4 CDs]. Mandrake Linux 9.2 [3 CDs] - new ! TEL Linux Networking 0 11-29-2003 11:27 AM
policy Hing Windows Networking 0 08-19-2003 12:01 PM



1 2 3 4 5 6 7 8 9 10 11