RES: RES: RES: Filtering outgoing connections in pf

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ricardo Augusto de Souza
Date: Thursday, October 16, 2008 - 4:31 am

Hi,

I wanna allow local users ( 10.10.0.0/24 ) to Access internet just using port 80, 25 110 and 53 udp.
I wanna allow full access to 10.10.20.0/24 to the internet.  I mean, no restriction.


Easy like that.

I used openBSD 3.8 in the past and I was able to filter packets in $ext_if from my local network ( 10.10.0.0/24 ).

Tests:

1) 
Users_tcp_ports = "{ 25, 80, 110, 443 }"
Users_udp_ports = "{ 53, 123 }"
Normal_users = "10.10.0.0/24"
Power_users = "10.10.20.0/24"


nat on $ext_if from $normal_users to any port $users_tcp_ports  -> ($ext_if) tagged NORMAL_USERS_NAT
nat on $ext_if from $power_users to any -> ($ext_if) tagged POWER_USERS_NAT



#outgoing
Block out on $ext_if
Pass out quick on $ext_if from ($ext_if) to any 

#filtering on $int_if
Pass in quick on $int_if inet proto tcp from $normal_users to any port $users_tcp_ports
Pass In quick on $int_if inet proto tcp from $power_users to any

Should this solve my problem?
I still have no test enviroment. I have around 300 users already going to the internet and to other WAN sites trhough this openBSD.

Plz, post me your suggestios.

Thanks

-----Mensagem original-----
De: cgc [mailto:cgc@lemon-computing.com] 
Enviada em: quarta-feira, 15 de outubro de 2008 16:21
Para: Ricardo Augusto de Souza
Cc: misc@openbsd.org
Assunto: Re: RES: RES: Filtering outgoing connections in pf

What exactly are you trying to achieve? what pc's do you want to have
access to what ports? Are you just allowing every pc in the 10.10.0.0/16
network the same access or not? And access to what? Just web traffic?
pings? dns? ...  You will have to be abit more specific 
And any box that is doing packet filtering between 2 or more networks, eg.
a private network and the internet, is a router as far as I am aware

Regards,

Charlie

On Wed, 15 Oct 2008 16:06:16 -0300, "Ricardo Augusto de Souza"
<ricardo.souza@cmtsp.com.br> wrote:
-- 
Charlie Clark
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
RES: RES: RES: Filtering outgoing connections in pf, Ricardo Augusto de Souza, (Thu Oct 16, 4:31 am)
Re: RES: RES: RES: Filtering outgoing connections in pf, Charlie Clark, (Thu Oct 16, 4:36 am)