miniupnp.tuxfamily.org Forum Index miniupnp.tuxfamily.org
The forum about miniupnp and libnatpmp
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Where to start with NetBSD 3.1_STABLE and miniupnpd?

 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Compilation/Installation
View previous topic :: View next topic  
Author Message
neilm



Joined: 15 Apr 2009
Posts: 8

PostPosted: Mon Apr 20, 2009 12:38 pm    Post subject: Where to start with NetBSD 3.1_STABLE and miniupnpd? Reply with quote

I'd love to install this on my home server to get my PS3 working through uPNP with my NetBSD server. Could anyone please suggest where I can read up on the process of installing and configuring it for NetBSD or is that a bit too much for me to take on as a basic NetBSD user?

I don't see it in /pub/pkgsrc/packages/NetBSD/i386/3.1_2009Q1/All/ so I guess I will have to wait until it's made for 2009Q1 release?

Any help/suggestions will be much appreciated, thanks!
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Mon Apr 20, 2009 10:05 pm    Post subject: Reply with quote

There is some NetBSD port : http://pkgsrc.se/net/miniupnpd
anyway you could :
    untar, make, make install
    configure and enjoy it Smile

I'm not using NetBSD so it may fail somewhere, but I'll be glad to help you.
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
neilm



Joined: 15 Apr 2009
Posts: 8

PostPosted: Tue Apr 21, 2009 8:20 am    Post subject: Reply with quote

Thanks!

The pcksrc for the i386 3.1 version of NetBSD has coincidentally just appeared at;

ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/i386/3.1_2009Q1/All/miniupnpd-1.2.0.20081009.tgz

So I can give that a go.
Back to top
View user's profile Send private message
neilm



Joined: 15 Apr 2009
Posts: 8

PostPosted: Tue Apr 21, 2009 1:24 pm    Post subject: Reply with quote

I started with;
Code:
$ setenv PKG_PATH ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/i386/3.1_2009Q1/All
$ pkg_add miniupnpd

which gave me;
Code:
ftp: connect to address 2001:4f8:3:7:230:48ff:fe31:43f2: No route to host
pkg_add: Warning: package `ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/i386/3.1_2009Q1/All/miniupnpd-1.2.0.20081009.tgz' was built for a different version of the OS:
pkg_add: NetBSD/i386 3.1 (pkg) vs. NetBSD/i386 3.1_STABLE (this host)
miniupnpd-1.2.0.20081009: copying /usr/pkg/share/examples/miniupnpd/miniupnpd.conf to /usr/pkg/etc/miniupnpd.conf
===========================================================================
The following files should be created for miniupnpd-1.2.0.20081009:

        /etc/rc.d/miniupnpd (m=0755)
            [/usr/pkg/share/examples/rc.d/miniupnpd]

===========================================================================

I copied the file as instructed above and into the etc/rc.conf I added;
Code:
echo "miniupnpd=YES" > /etc/rc.conf.d/miniupnpd


I start miniupnpd with;
Code:
etc/rc.d/miniupnpd start

and get;
Code:
Starting miniupnpd.
Reading configuration from file /usr/pkg/etc/miniupnpd.conf
perm rule added : allow 1024-65535 c0a80000/ffffff00 1024-65535
perm rule added : allow 1024-65535 c0a80100/ffffff00 1024-65535
perm rule added : allow 1024-65535 c0a80000/fffffe00 22-22
perm rule added : allow 12345-12345 c0a80771/ffffffff 54321-54321
perm rule added : deny 0-65535 00000000/00000000 0-65535

I get this in my log file;
Code:
Apr 21 14:04:33 home-server miniupnpd[4546]: open("/dev/pf"): Device not configured
Apr 21 14:04:33 home-server miniupnpd[4546]: Failed to init redirection engine. EXITING


I don't have a /dev/pf so I'm not sure what to do next.
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Wed Apr 22, 2009 10:31 am    Post subject: Reply with quote

About version warning, you should contact the port maintainer...

What firewalling/packet filtering software is using your machine ?
pf or ipf ? It seems that the port was compiled for using pf.
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
neilm



Joined: 15 Apr 2009
Posts: 8

PostPosted: Thu Apr 23, 2009 11:36 am    Post subject: Reply with quote

My server/gateway is using ipf
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Thu Apr 23, 2009 11:50 am    Post subject: Reply with quote

So you should download sources of miniupnpd-1.3, unpack,
make config.h
check that config.h contain options for compiling with IPF ( #define USE_IPF 1 )
It may also be needed to force FWNAME to ipf in Makefine
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Thu Apr 23, 2009 11:52 am    Post subject: Reply with quote

and you could help me to have a reliable way to find whether a NetBSD system is using pf or ipf
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
neilm



Joined: 15 Apr 2009
Posts: 8

PostPosted: Fri Apr 24, 2009 12:01 pm    Post subject: Reply with quote

miniupnp wrote:
and you could help me to have a reliable way to find whether a NetBSD system is using pf or ipf


My IT supplier, who specialises in NetBSD, tells me that IPF is the default for all versions of NetBSD.

[edit] I just re-read your post and understood what you were asking.

The command: # config -x | grep pf will show the following on my server;
Code:
options         PPP_FILTER      # Active filter support for PPP (requires bpf)
options         PFIL_HOOKS      # pfil(9) packet filter hooks
pseudo-device   bpfilter        8       # Berkeley packet filter
pseudo-device   ipfilter                # IP filter (firewall) and NAT
options         BRIDGE_IPF              # bridge uses IP/IPv6 pfil hooks too
#pseudo-device  pf                      # PF packet filter
#pseudo-device  pflog                   # PF log if

showing that the pf is commented out.

My 3.1_STABLE version has, in /etc/rc.conf, the entry 'ipfilter=YES' if that's any help to you?[/edit]
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Fri Apr 24, 2009 10:25 pm    Post subject: Reply with quote

here is the shell script code for FreeBSD :
Code:

                # new way to see which one to use PF or IPF.
                # see http://miniupnp.tuxfamily.org/forum/viewtopic.php?p=957
                # source file with handy subroutines like checkyesno
                . /etc/rc.subr
                # source config file so we can probe vars
                . /etc/rc.conf
                if checkyesno ipfilter_enable; then
                        echo "Using ipf"
                        FW=ipf
                        echo "#define USE_IPF 1" >> ${CONFIGFILE}
                elif checkyesno pf_enable; then
                        echo "Using pf"
                        FW=pf
                        echo "#define USE_PF 1" >> ${CONFIGFILE}
                else
                        echo "Could not detect usage of ipf or pf. Compiling for pf by default"
                        FW=pf
                        echo "#define USE_PF 1" >> ${CONFIGFILE}
                fi

What we need is the equivalent code for NetBSD
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
neilm



Joined: 15 Apr 2009
Posts: 8

PostPosted: Tue Apr 28, 2009 3:27 pm    Post subject: Reply with quote

I'll post back once I've researched this a bit further. For the moment I don't fully understand the NetBSD directory structure for installing software other than the packages from pkgsrc.

Once I understand the system I'll hopefully be able to shed more light on the shell script code for NetBSD.

Thanks.
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Wed Apr 29, 2009 11:58 am    Post subject: Reply with quote

you could give me a ssh access to your machine for me to test the shell script... contact me by email if you agree.
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
neilm



Joined: 15 Apr 2009
Posts: 8

PostPosted: Thu Apr 30, 2009 12:15 pm    Post subject: Reply with quote

I'm not sure it would work as my server is run on NetBSD through Netmanager software. This means it isn't a typical install and may not include all of the bits you need. If that doesn't matter let me know and we'll discuss access.
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Thu Apr 30, 2009 7:22 pm    Post subject: Reply with quote

as long as /etc/rc.* stuff is standard it will do the job !
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
neilm



Joined: 15 Apr 2009
Posts: 8

PostPosted: Tue May 05, 2009 8:57 am    Post subject: Reply with quote

email sent!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Compilation/Installation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP
© 2007 Thomas Bernard, author of MiniUPNP.