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 

troubles with miniupnpd Freebsd 8.2

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



Joined: 03 Jun 2011
Posts: 5
Location: Moscow

PostPosted: Fri Jun 03, 2011 12:14 pm    Post subject: troubles with miniupnpd Freebsd 8.2 Reply with quote

Hello,

Please help me on following case:

Code:
/usr/local/etc/rc.d>uname -a
FreeBSD gw.home.lcl 8.2-STABLE FreeBSD 8.2-STABLE #5: Fri Jun  3 03:55:55 MSD 2011 root@gw.home.lcl:/usr/obj/usr/src/sys/BONDKERN  i386


Miniupnpd installed from ports. Config of miniupnpd:

Code:

/usr/local/etc>cat ./miniupnpd.conf | grep -v '^#' | sed '/^$/d'
ext_ifname=sk0
ext_ip=*.*.19.66
listening_ip=10.1.0.1
port=5555
bitrate_up=131072
bitrate_down=524288
secure_mode=yes
system_uptime=yes
clean_ruleset_interval=600
notify_interval=30
uuid=f8565bd4-8d3a-11e0-8d57-00112fba8587
allow 1024-65535 10.1.0.0/24 1024-65535
deny 0-65535 0.0.0.0/0 0-65535


PF config:

Code:

/usr/local/etc>cat /etc/pf.conf | grep -v '^#' | sed '/^$/d'
ext_if="sk0"
external_addr="*.*.19.66"
int_if="em0"
internal_net="10.1.0.0/24"
nat on $ext_if from $internal_net to any -> $external_addr
rdr-anchor miniupnpd
anchor miniupnpd
pass in quick proto igmp all allow-opts
pass out quick proto igmp all allow-opts
pass out quick on $int_if from any to 239.0.0.0/8 keep state
pass in quick on $int_if from any to 239.0.0.0/8 keep state
pass in all
pass out all


Starting miniupnpd in debug mode:

Code:

/usr/local/etc/rc.d>miniupnpd -f /usr/local/etc/miniupnpd.conf -d
miniupnpd[25778]: HTTP listening on port 5555


OK, miniupnpd is running:

Code:

/usr/local/etc>sockstat -4 -l | grep miniupnpd
root     miniupnpd  25778 5  tcp4   *:5555                *:*
root     miniupnpd  25778 6  udp4   *:1900                *:*
root     miniupnpd  25778 7  udp4   10.1.0.1:48461        *:*



Now I start uTorrent with UPNP enabled on my win pc. We can see that there are some upnp traffic coming from win pc:

Code:

/usr/local/etc>tcpdump -i em0 port 1900 or port 5555 > /root/tcpdump.log
cat /root/tcpdump.log

15:41:52.112939 IP6 fe80::5cbe:cbdb:e3eb:f511.61545 > ff02::c.1900: UDP, length
15:42:07.561265 IP pc.home.lcl.52612 > 239.255.255.250.1900: UDP, length 9
15:42:12.564581 IP pc.home.lcl.52612 > 239.255.255.250.1900: UDP, length 9
15:42:17.579889 IP pc.home.lcl.52612 > 239.255.255.250.1900: UDP, length 9
15:42:20.430164 IP pc.home.lcl.61547 > 239.255.255.250.1900: UDP, length 1


But there are no any reaction from miniupnpd on debug stdout and no any interaction with PF:

Code:

/usr/local>pfctl -a miniupnpd -sn




What's wrong???
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Sat Jun 04, 2011 8:11 am    Post subject: Reply with quote

the only thing I see that is wrong is
Code:
ext_ip=*.*.19.66
, you should comment this line in miniupnpd.conf, specifying interface name is sufficient.
But that doesn't explain why miniupnpd doesn't see any SSDP trafic Sad

Does tcpdump display the SSDP NOTIFY messages which are sent every 30seconds by miniupnpd ?
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
Radiolab



Joined: 03 Jun 2011
Posts: 5
Location: Moscow

PostPosted: Sat Jun 04, 2011 9:30 pm    Post subject: Reply with quote

Hello, dear miniupndp author


I've commented out
Code:
ext_ip=*.*.19.66
but the problem has NOT gone.

Also I've tested miniupnpd for sending notify messages:

Code:
/root>tcpdump -i em0 port 1900


There are no any messages from miniupnpd to network. We can see, that miniupnpd neither send messages nor receive.


Maybe my /etc/rc.conf can be helpful to solve problrm. All services listed below work fine.

Code:

font8x14="cp866-8x14"
font8x16="cp866b-8x16"
font8x8="cp866-8x8"
scrnmap="koi8-r2cp866"
keymap="ru.koi8-r"
keyrate="fast"
gateway_enable="YES"
pf_enable="YES"
pf_rules="/etc/pf.conf"
pf_flags=""
pflog_enable="YES"
pflog_logfile="/var/log/pflog.pcap"
pflog_flags="-s 1500"
hostname="gw.home.lcl"
defaultrouter="*.*.19.1"
ifconfig_em0="inet 10.1.0.1  netmask 255.255.255.0"
ifconfig_sk0="inet *.*.19.66 netmask 255.255.255.0"
moused_enable="NO"
moused_type="NO"
ntpdate_program="/usr/sbin/ntpdate"
ntpdate_flags="-b -u ntp1.vniiftri.ru ntp2.vniiftri.ru ntp3.vniiftri.ru ntp4.vni
iftri.ru"
ntpd_enable="YES"
ntpd_config="/etc/ntp.conf"
proftpd_enable="YES"
router_enable="NO"
sshd_enable="YES"
mysql_enable="YES"
apache22_enable="YES"
dhcpd_enable="YES"                         
dhcpd_flags="-4 -q"                           
proftpd_enable="YES"
dhcpd_ifaces="em0"                          # ethernet interface(s)
dhcpd_withumask="022"                       # file creation mask
dhcpd_chuser_enable="YES"           # runs w/o privileges?
dhcpd_withuser="dhcpd"              # user name to run as
dhcpd_withgroup="dhcpd"             # group name to run as
dhcpd_chroot_enable="YES"           # runs chrooted?
dhcpd_devfs_enable="YES"            # use devfs if available?
dhcpd_rootdir="/var/db/dhcpd"       # directory to run in
dhcpd_includedir="/usr/local/etc/"  # directory with config
syslogd_flags="-s -l /var/db/dhcpd/var/run/log"
watchdogd_enable="YES"
named_enable="YES"
samba_enable="YES"
gif_interfaces="gif0 gif1"
gifconfig_gif0="*.*.19.66 *.*.105.181"
ifconfig_gif0="inet 10.1.0.1 10.2.0.1 netmask 255.255.255.255 mtu 1500"
gifconfig_gif1="*.*.19.66 *.*.241.138"
ifconfig_gif1="inet 10.1.0.1 192.168.0.1 netmask 255.255.255.255 mtu 1500"
static_routes="yas rvt"
route_yas="-net 10.2.0.0/24 10.2.0.1"
route_rvt="-net 192.168.0.0/24 192.168.0.1"
miniupnpd_enable="YES"
miniupnpd_config="/usr/local/etc/miniupnp.conf"
miniupnpd_flags=""
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1589

PostPosted: Sun Jun 05, 2011 10:47 pm    Post subject: Reply with quote

I dont understand what's wrong.

just to be sure, could you run tcpdump again with -n option ?
Code:
/usr/local/etc>tcpdump -i em0 port 1900 or port 5555 > /root/tcpdump.log
cat /root/tcpdump.log

15:41:52.112939 IP6 fe80::5cbe:cbdb:e3eb:f511.61545 > ff02::c.1900: UDP, length
15:42:07.561265 IP pc.home.lcl.52612 > 239.255.255.250.1900: UDP, length 9
15:42:12.564581 IP pc.home.lcl.52612 > 239.255.255.250.1900: UDP, length 9
15:42:17.579889 IP pc.home.lcl.52612 > 239.255.255.250.1900: UDP, length 9
15:42:20.430164 IP pc.home.lcl.61547 > 239.255.255.250.1900: UDP, length 1


anyway a problem with the source ip address here wouldn't explain why miniupnpd doesn't send NOTIFY...
Is there only 1 network interface with the IP 10.1.0.1 ? If not miniupnpd could join the Multicast group on the wrong one.
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
Radiolab



Joined: 03 Jun 2011
Posts: 5
Location: Moscow

PostPosted: Mon Jun 06, 2011 1:54 pm    Post subject: Reply with quote

Thank you ever so much for your advice!!!!!!

The problem was so easy - my VPN tunnels (gif0, gif1) has the same IP with local net interface em0. Miniupnpd binds to one of them instead of binding to em0.

Here the parts of rc.conf, caused the problem :
Code:

ifconfig_em0="inet 10.1.0.1  netmask 255.255.255.0"
ifconfig_gif0="inet 10.1.0.1 10.2.0.1 netmask 255.255.255.255 mtu 1500"
ifconfig_gif1="inet 10.1.0.1 192.168.0.1 netmask 255.255.255.255 mtu 1500"


Workaround:

I've changed tunnels to another private address block:

Code:

ifconfig_gif0="inet 10.11.0.1 10.12.0.1 netmask 255.255.255.255 mtu 1500"
ifconfig_gif1="inet 10.21.0.1 192.168.1.1 netmask 255.255.255.255 mtu 1500"
static_routes="yas rvt"
route_yas="-net 10.2.0.0/24 10.12.0.1"
route_rvt="-net 192.168.0.0/24 192.168.1.1"


Now everything is OK. Thank you for a very useful daemon!
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.