View previous topic :: View next topic |
Author |
Message |
neilm
Joined: 15 Apr 2009 Posts: 8
|
Posted: Mon Apr 20, 2009 12:38 pm Post subject: Where to start with NetBSD 3.1_STABLE and miniupnpd? |
|
|
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 |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Mon Apr 20, 2009 10:05 pm Post subject: |
|
|
There is some NetBSD port : http://pkgsrc.se/net/miniupnpd
anyway you could :
untar, make, make install configure and enjoy it
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 |
|
|
neilm
Joined: 15 Apr 2009 Posts: 8
|
|
Back to top |
|
|
neilm
Joined: 15 Apr 2009 Posts: 8
|
Posted: Tue Apr 21, 2009 1:24 pm Post subject: |
|
|
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 |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Wed Apr 22, 2009 10:31 am Post subject: |
|
|
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 |
|
|
neilm
Joined: 15 Apr 2009 Posts: 8
|
Posted: Thu Apr 23, 2009 11:36 am Post subject: |
|
|
My server/gateway is using ipf |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Thu Apr 23, 2009 11:50 am Post subject: |
|
|
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 |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Thu Apr 23, 2009 11:52 am Post subject: |
|
|
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 |
|
|
neilm
Joined: 15 Apr 2009 Posts: 8
|
Posted: Fri Apr 24, 2009 12:01 pm Post subject: |
|
|
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 |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Fri Apr 24, 2009 10:25 pm Post subject: |
|
|
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 |
|
|
neilm
Joined: 15 Apr 2009 Posts: 8
|
Posted: Tue Apr 28, 2009 3:27 pm Post subject: |
|
|
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 |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Wed Apr 29, 2009 11:58 am Post subject: |
|
|
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 |
|
|
neilm
Joined: 15 Apr 2009 Posts: 8
|
Posted: Thu Apr 30, 2009 12:15 pm Post subject: |
|
|
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 |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1589
|
Posted: Thu Apr 30, 2009 7:22 pm Post subject: |
|
|
as long as /etc/rc.* stuff is standard it will do the job ! _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
neilm
Joined: 15 Apr 2009 Posts: 8
|
Posted: Tue May 05, 2009 8:57 am Post subject: |
|
|
email sent! |
|
Back to top |
|
|
|