DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 6th July 2017
joker72 joker72 is offline
Real Name: Dan
New User
 
Join Date: Feb 2015
Location: USA
Posts: 9
Default Intel PRO/1000 Dual Port Server Adapter

Has anyone had any luck using the Intel PRO/1000 Dual Port Server Adapter for a SOHO router/firewall with OpenBSD or know if it should work?

I can ping the internet and internal network from the machine and ping the machine from the internal network but can't ping the internet from the internal network.

net.inet.ip.forwarding = 1 is set.

Last edited by joker72; 6th July 2017 at 04:57 PM.
Reply With Quote
  #2   (View Single Post)  
Old 6th July 2017
TronDD TronDD is offline
Spam Deminer
 
Join Date: Sep 2014
Posts: 307
Default

Do you have NAT set up in pf?

What is the contents of your pf.conf?
Reply With Quote
  #3   (View Single Post)  
Old 6th July 2017
joker72 joker72 is offline
Real Name: Dan
New User
 
Join Date: Feb 2015
Location: USA
Posts: 9
Default

I disabled PF in order to confirm the card worked. I was then going to move onto PF rules afterwards.

pfctl -d
pfctl -F

Could this still be my problem?

Thanks.

Last edited by joker72; 6th July 2017 at 07:14 PM.
Reply With Quote
  #4   (View Single Post)  
Old 6th July 2017
TronDD TronDD is offline
Spam Deminer
 
Join Date: Sep 2014
Posts: 307
Default

Yeah. NAT is an active process. It doesn't just work. Pf has to be enabled to perform the address translations.

Get pf set up with something simple to verify it'll work. THen you can buld up your ruleset, or if there is still a problem, it'll be a minimal ruleset to debug.
Reply With Quote
  #5   (View Single Post)  
Old 6th July 2017
joker72 joker72 is offline
Real Name: Dan
New User
 
Join Date: Feb 2015
Location: USA
Posts: 9
Default

Will do tonight and give an update.

Thanks for your help.
Reply With Quote
  #6   (View Single Post)  
Old 6th July 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

Hello and welcome!

Private network addresses (192.168.x.x, 10.x..x.x, others ...) are not usable on the Internet.
There's no way for any Internet server to address your computer at 192.168.1.100, because there are millions of computers using that same address.

Network Address Translation ("NAT") is the mechanism we use to interconnect those private networks with the Internet.

For OpenBSD, NAT is provisioned with PF.

http://www.openbsd.org/faq/pf/nat.html

Last edited by jggimi; 6th July 2017 at 08:25 PM. Reason: typo
Reply With Quote
  #7   (View Single Post)  
Old 7th July 2017
LeFrettchen's Avatar
LeFrettchen LeFrettchen is offline
Marveled user
 
Join Date: Aug 2012
Location: France
Posts: 408
Default

Welcome joker72
__________________
ThinkPad W500 P8700 6GB HD3650 - faultry
ThinkStation P700 2x2620v3 32GB 1050ti 3xSSD 1xHDD
Reply With Quote
  #8   (View Single Post)  
Old 7th July 2017
joker72 joker72 is offline
Real Name: Dan
New User
 
Join Date: Feb 2015
Location: USA
Posts: 9
Default

Thanks for the welcomes guys. Really glad to be with the group.

My pf.conf file is as follows:
Code:
Extif = "em0"
Intif = "em1"

PrivNet = "192.168.1.0/24"

match out log on $Extif from $PrivNet to any received on $Intif tag EGRESS nat-to ($Extif:0)
I admit this pf.conf file was pirated.

With this enabled I am able to ping em0 through em1 from the internal network but do not get a response when pinging 8.8.8.8 from within the internal network (as opposed to no route to destination). Pings from the router/FW machine work as expected.

Also tried below where XXX.XXX.XXX.XXX = External/Public IP per the link provided by jggimi with same results as above.

Code:
PrivNet = "192.168.1.0/24"

pass out on em0 from $PrivNet to any nat-to XXX.XXX.XXX.XXX
Thanks!

Last edited by joker72; 7th July 2017 at 06:42 PM. Reason: Please use [code] & [/code] tags when posting file contents.
Reply With Quote
  #9   (View Single Post)  
Old 7th July 2017
joker72 joker72 is offline
Real Name: Dan
New User
 
Join Date: Feb 2015
Location: USA
Posts: 9
Default

Gonna give this a read over the weekend.

http://home.nuug.no/~peter/pf/en/

I'll post my resolution if I am able to come up with one.

Thanks.
Reply With Quote
Old 7th July 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

The chapter of the PF User's Guide that I linked above will also be helpful. But Peter's tutorial (and his book) are wonderful, too. His Pledge of the Network Admin at the beginning of his tutorial is pointed right at your configuration.
Reply With Quote
Old 10th July 2017
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

Peter's a friend, he's great so definitely +1 on all his work.
However, if you're looking for a simple SOHO router setup, you kinda can't beat the OpenBSD FAQ: https://www.openbsd.org/faq/pf/example1.html
Reply With Quote
Old 10th July 2017
joker72 joker72 is offline
Real Name: Dan
New User
 
Join Date: Feb 2015
Location: USA
Posts: 9
Default

So the Intel PRO/1000 Dual Port Server Adapter does work with OpenBSD 6.1. Now I just need to get name resolution working for my clients. This post was executed through my new OpenBSD SOHO router/firewall. Just to get things moving I pirated from the example from the OpenBSD FAQ but I understand it for the most part.

Code:
int_if="em1"
table <martians> { 0.0.0.0/8 10.0.0.0/8 127.0.0.0/8 169.254.0.0/16     \
	 	   172.16.0.0/12 192.0.0.0/24 192.0.2.0/24 224.0.0.0/3 \
	 	   192.168.0.0/16 198.18.0.0/15 198.51.100.0/24        \
	 	   203.0.113.0/24 }
set block-policy drop
set loginterface egress
set skip on lo0
match in all scrub (no-df random-id max-mss 1440)
match out on egress inet from !(egress:network) to any nat-to (egress:0)
block in quick on egress from <martians> to any
block return out quick on egress from any to <martians>
block all
pass out quick inet
pass in on $int_if inet
I have not opened up any ports yet,

The issue I was having with the internal network not being able to successfully ping the internet (8.8.8.8) seems to have been caused by using the subnet mask provided by my ISP. They suggested to use 255.255.255.252 which worked on my Netgear router. When I changed it to 255.255.255.0 it works. I had these same results when playing with PFSense over the weekend.

Anyway, thanks for the encouragement.

Any hints on getting name resolution for the clients working would be greatly appreciated. I'm looking into unbound but get a syntax error when I change the config file by as little as deleting a #.

Last edited by joker72; 10th July 2017 at 08:38 PM.
Reply With Quote
Old 11th July 2017
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

For completeness, there are several NICs named "Intel PRO/1000 Dual Port Server Adapter," all of which are explicitly named in the em(4) man page:
Code:
Intel PRO/1000MT Dual Port Server Adapter (PWLA8492MT)
Intel PRO/1000MF Dual Port Server Adapter (SX Fiber) (PWLA8492MF)
Intel PRO/1000PT Dual Port Server Adapter
Intel PRO/1000PF Dual Port Server Adapter (SX Fiber)
Intel PRO/1000ET Dual Port Server Adapter
FWIW, any Intel Gigabit adapter you can find ought to work (and if it's a 10/100 NIC, it'll work with fxp(4) and if it's a 10G NIC, it'll work with ix(4) or ixgb(4)).

As to name resolution, everything you need is on that page I posted earlier. Follow the DHCP and DNS instructions, or simply pirate them if you'd like. They work.

Mine looks like this:
Code:
# $OpenBSD: unbound.conf,v 1.7 2016/03/30 01:41:25 sthen Exp $

server:
        interface: 10.0.0.1
        interface: 127.0.0.1
        access-control: 10.0.0.0/8 allow
        do-not-query-localhost: no
        hide-identity: yes
        hide-version: yes

forward-zone:
        name: "."
        forward-addr: 209.18.47.62      # Spectrum DNS
        forward-addr: 209.18.47.61      # Spectrum DNS
        forward-addr: 8.8.8.8           # Google DNS
        forward-addr: 8.8.4.4           # Google DNS
Reply With Quote
Old 12th July 2017
joker72 joker72 is offline
Real Name: Dan
New User
 
Join Date: Feb 2015
Location: USA
Posts: 9
Default

Thanks ibara. I'm going to spend some time studying the man pages from a high level now. Never would have guessed that that would have been in the man pages. You guys will have me up to speed in no time.

Thanks again.
Reply With Quote
Old 12th July 2017
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

All the section 4 pages have a list of hardware (often non-exhaustive but pretty good) that works with the driver to get people started.

There is also the NYC*BUG dmesgd service, where *BSD users submit their machine dmesgs. You can search dmesgs for anything you'd like.
http://dmesgd.nycbug.org/
(Usual disclaimer: I am one of the people who runs NYC*BUG.)
Reply With Quote
Reply


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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Which dual port 10g ethernet nic's supported in OpenBSD 5.7+ ? mbw OpenBSD General 1 18th September 2015 12:17 AM
dual boot ubuntu server 13.04 with freebsd 10 release philo_neo71 FreeBSD Installation and Upgrading 1 18th February 2014 10:03 PM
Port Forwarding with Dual WAN Connections alpha202ej OpenBSD Security 0 14th December 2011 02:05 AM
Problems with 1000baseTX on Intel Pro 1000 desktop PCI card [FreeBSD 7.0 RELEASE] asmo FreeBSD General 0 28th June 2008 07:12 PM
FreeBSD 6 on Intel server arix FreeBSD Installation and Upgrading 0 23rd May 2008 03:01 PM


All times are GMT. The time now is 11:06 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick