Unix Technical Forum

Firewall / NAT on 3.3

This is a discussion on Firewall / NAT on 3.3 within the comp.unix.bsd.openbsd.misc forums, part of the OpenBSD category; --> Hi all, I'm trying to configure an OpenBSD 3.3 box as a Firewall/NAT/Gateway. I've read lots of documentation and ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > comp.unix.bsd.openbsd.misc

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-16-2008, 04:29 AM
Wm. G. Urquhart
 
Posts: n/a
Default Firewall / NAT on 3.3

Hi all,

I'm trying to configure an OpenBSD 3.3 box as a Firewall/NAT/Gateway.
I've read lots of documentation and configured the machine correctly.
However, I still can't get out of the box.

I've set net.inet.ip.forwarding=1 in /etc/sysctl.conf, created a
pf.conf file from the OpenBSD firewall example. The only exception
here is that I've ommited the rdr entry, the tcp_services and
icmp_types, the I enabled PF in the /etc/rc.conf file as well.

From what I've read and (mis)understood this is all I need to do, am
I right in this assumption? If this is the case can anyone help me
out here?

I'd appreciate your assistance here thanks.

--
Regards,

Wm. G. Urquhart
(s/_//g to reply.)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-16-2008, 04:29 AM
erik
 
Posts: n/a
Default Re: Firewall / NAT on 3.3

Wm. G. Urquhart wrote:

> Hi all,
>
> I'm trying to configure an OpenBSD 3.3 box as a Firewall/NAT/Gateway.
> I've read lots of documentation and configured the machine correctly.
> However, I still can't get out of the box.
>
> I've set net.inet.ip.forwarding=1 in /etc/sysctl.conf, created a
> pf.conf file from the OpenBSD firewall example. The only exception
> here is that I've ommited the rdr entry, the tcp_services and
> icmp_types, the I enabled PF in the /etc/rc.conf file as well.
>
> From what I've read and (mis)understood this is all I need to do, am
> I right in this assumption? If this is the case can anyone help me
> out here?
>
> I'd appreciate your assistance here thanks.
>


Switch on logging, and use tcpdump -nettti pflog0. If that doesn't help,
start tcpdump on the normal interfaces to see where you made mistakes.

EJ
--
Remove the obvious part (including the dot) for my email address

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-16-2008, 04:29 AM
Bards
 
Posts: n/a
Default Re: Firewall / NAT on 3.3

erik wrote:
> Wm. G. Urquhart wrote:
>
>
>>Hi all,
>>
>>I'm trying to configure an OpenBSD 3.3 box as a Firewall/NAT/Gateway.
>>I've read lots of documentation and configured the machine correctly.
>>However, I still can't get out of the box.
>>
>>I've set net.inet.ip.forwarding=1 in /etc/sysctl.conf, created a
>>pf.conf file from the OpenBSD firewall example. The only exception
>>here is that I've ommited the rdr entry, the tcp_services and
>>icmp_types, the I enabled PF in the /etc/rc.conf file as well.
>>
>>From what I've read and (mis)understood this is all I need to do, am
>>I right in this assumption? If this is the case can anyone help me
>>out here?
>>
>>I'd appreciate your assistance here thanks.
>>

>
>
> Switch on logging, and use tcpdump -nettti pflog0. If that doesn't help,
> start tcpdump on the normal interfaces to see where you made mistakes.
>
> EJ


Did you reboot after changing /etc/sysctl.conf ? you could also use
sysctl -w net.inet.ip.forwarding=1 to save a reboot.

HTH.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-16-2008, 04:29 AM
Wm. G. Urquhart
 
Posts: n/a
Default Re: Firewall / NAT on 3.3

In article <bhldis$n1e$3@otis.netspace.net.au>, Bards wrote:
> erik wrote:
>> Wm. G. Urquhart wrote:
>>
>>
>>>Hi all,
>>>
>>>I'm trying to configure an OpenBSD 3.3 box as a Firewall/NAT/Gateway.
>>>I've read lots of documentation and configured the machine correctly.
>>>However, I still can't get out of the box.
>>>
>>>I've set net.inet.ip.forwarding=1 in /etc/sysctl.conf, created a
>>>pf.conf file from the OpenBSD firewall example. The only exception
>>>here is that I've ommited the rdr entry, the tcp_services and
>>>icmp_types, the I enabled PF in the /etc/rc.conf file as well.
>>>
>>>From what I've read and (mis)understood this is all I need to do, am
>>>I right in this assumption? If this is the case can anyone help me
>>>out here?
>>>
>>>I'd appreciate your assistance here thanks.
>>>

>>
>>
>> Switch on logging, and use tcpdump -nettti pflog0. If that doesn't help,
>> start tcpdump on the normal interfaces to see where you made mistakes.
>>

>
> Did you reboot after changing /etc/sysctl.conf ? you could also use
> sysctl -w net.inet.ip.forwarding=1 to save a reboot.
>


Hi,

Using tcpdump produces a continuous stream of arp requests, speaking of
which. I get this popping up :

blowfish /bsd: arpresolve: can't allocate llinfo

What does this mean? Could this explain why things don't work?

--
Regards,

Wm. G. Urquhart
(s/_//g to reply.)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-16-2008, 04:29 AM
@(none).adelphia.net
 
Posts: n/a
Default Re: Firewall / NAT on 3.3

Wm. G. Urquhart wrote:
> In article <bhldis$n1e$3@otis.netspace.net.au>, Bards wrote:
>
>>erik wrote:
>>
>>>Wm. G. Urquhart wrote:
>>>
>>>
>>>
>>>>Hi all,
>>>>
>>>>I'm trying to configure an OpenBSD 3.3 box as a Firewall/NAT/Gateway.
>>>>I've read lots of documentation and configured the machine correctly.
>>>>However, I still can't get out of the box.
>>>>
>>>>I've set net.inet.ip.forwarding=1 in /etc/sysctl.conf, created a
>>>>pf.conf file from the OpenBSD firewall example. The only exception
>>>>here is that I've ommited the rdr entry, the tcp_services and
>>>>icmp_types, the I enabled PF in the /etc/rc.conf file as well.
>>>>
>>>
>>>>From what I've read and (mis)understood this is all I need to do, am
>>>
>>>>I right in this assumption? If this is the case can anyone help me
>>>>out here?
>>>>
>>>>I'd appreciate your assistance here thanks.
>>>>
>>>
>>>
>>>Switch on logging, and use tcpdump -nettti pflog0. If that doesn't help,
>>>start tcpdump on the normal interfaces to see where you made mistakes.
>>>

>>
>>Did you reboot after changing /etc/sysctl.conf ? you could also use
>>sysctl -w net.inet.ip.forwarding=1 to save a reboot.
>>

>
>
> Hi,
>
> Using tcpdump produces a continuous stream of arp requests, speaking of
> which. I get this popping up :
>
> blowfish /bsd: arpresolve: can't allocate llinfo
>
> What does this mean? Could this explain why things don't work?
>

I'm having the same problem,
I found here it mentions something about setting up a bridge:
http://www.jp.daemonnews.org/200207/transpfobsd.html
I haven't tried it yet, but interesting enough I noticed that the pf
example doesn't have any nat commands, where as the example at
OpenBSD.org does.
Being that I installed OpenBSD for the first time 5 days ago, I'm not
much help beyond this, but you might want to look at that site.
I would be interested also if you this does the trick as I am going to
try this out tomorrow.

Hope this helps:

Anyone reading this I would also be interested in your opinion on the
tutorial mentioned above.

Joe



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-16-2008, 04:29 AM
Uwe Dippel
 
Posts: n/a
Default Re: Firewall / NAT on 3.3

On Sun, 17 Aug 2003 00:21:09 +0800, @(none).adelphia.net wrote:

> I'm having the same problem,
> I found here it mentions something about setting up a bridge:


not needed. NAT defies bridge.

> http://www.jp.daemonnews.org/200207/transpfobsd.html I haven't tried it
> yet, but interesting enough I noticed that the pf example doesn't have
> any nat commands, where as the example at OpenBSD.org does.


See above. Try the example from OpenBSD. Works flawlessly on 3.3

Uwe

P.S.:Follow the advice in this thread and provide details of your setup
and what you want for further help, if still required.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-16-2008, 04:29 AM
Johan Berg
 
Posts: n/a
Default Re: Firewall / NAT on 3.3

On Sat, 16 Aug 2003, Wm. G. Urquhart wrote:

> Hi all,
>
> I'm trying to configure an OpenBSD 3.3 box as a Firewall/NAT/Gateway.
> I've read lots of documentation and configured the machine correctly.
> However, I still can't get out of the box.
>
> I've set net.inet.ip.forwarding=1 in /etc/sysctl.conf, created a
> pf.conf file from the OpenBSD firewall example. The only exception
> here is that I've ommited the rdr entry, the tcp_services and
> icmp_types, the I enabled PF in the /etc/rc.conf file as well.
>


I would like to have a look at your pf.conf, can you paste it?


> From what I've read and (mis)understood this is all I need to do, am
> I right in this assumption? If this is the case can anyone help me
> out here?
>
> I'd appreciate your assistance here thanks.
>
> --
> Regards,
>
> Wm. G. Urquhart
> (s/_//g to reply.)
>



--
Johan Berg
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-16-2008, 04:29 AM
Joris Kemperman
 
Posts: n/a
Default Re: Firewall / NAT on 3.3

"Wm. G. Urquhart"

> Hi all,
>
> I'm trying to configure an OpenBSD 3.3 box as a Firewall/NAT/Gateway.
> I've read lots of documentation and configured the machine correctly.
> However, I still can't get out of the box.
>
> I've set net.inet.ip.forwarding=1 in /etc/sysctl.conf, created a
> pf.conf file from the OpenBSD firewall example. The only exception
> here is that I've ommited the rdr entry, the tcp_services and
> icmp_types, the I enabled PF in the /etc/rc.conf file as well.
>
> From what I've read and (mis)understood this is all I need to do, am
> I right in this assumption? If this is the case can anyone help me
> out here?
>
> I'd appreciate your assistance here thanks.


Since there is not much change you make wrong changements in your
sysctl.conf and rc.conf file, you probably made an mistake in your pf.conf.
Could you post your pf.conf file in here?

p.s. don't forget to reboot or restart your sysctl.

--
Joris Kemperman


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-16-2008, 04:29 AM
Dorian =?ISO-8859-1?Q?B=FCttner?=
 
Posts: n/a
Default Re: Firewall / NAT on 3.3

Wm. G. Urquhart wrote:

> Hi all,
>
> I'm trying to configure an OpenBSD 3.3 box as a Firewall/NAT/Gateway.
> I've read lots of documentation and configured the machine correctly.
> However, I still can't get out of the box.
>
> I've set net.inet.ip.forwarding=1 in /etc/sysctl.conf, created a
> pf.conf file from the OpenBSD firewall example. The only exception
> here is that I've ommited the rdr entry, the tcp_services and
> icmp_types, the I enabled PF in the /etc/rc.conf file as well.
>
> From what I've read and (mis)understood this is all I need to do, am
> I right in this assumption? If this is the case can anyone help me
> out here?
>
> I'd appreciate your assistance here thanks.
>

http://www.fmi.uni-passau.de/~grafj/...T_und_Firewall
commented in german, but may be understandable and working for you, too.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-16-2008, 04:30 AM
mr_scary
 
Posts: n/a
Default Re: Firewall / NAT on 3.3

On Sat, 16 Aug 2003 13:03:06 GMT, "Wm. G. Urquhart"
<wgu@factotum.wurquhart.co.uk> said the following:

>Hi all,


Hello.

>I'm trying to configure an OpenBSD 3.3 box as a Firewall/NAT/Gateway.
>I've read lots of documentation and configured the machine correctly.
>However, I still can't get out of the box.
>
>I've set net.inet.ip.forwarding=1 in /etc/sysctl.conf, created a
>pf.conf file from the OpenBSD firewall example. The only exception
>here is that I've ommited the rdr entry, the tcp_services and
>icmp_types, the I enabled PF in the /etc/rc.conf file as well.


Assuming your system is supposed to be working right now, what is your
output to the following commands:

$ pfctl -s rules
$ pfclt -s nat
$ ifconfig <driver_of_internal_nic>
$ ifconfig <driver_of_external_nic>
$ netstat -rnf inet

You might as well tell me how you are trying to connect to the net.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:49 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com