 |

 |
|
 |
| |
07-21-2009, 01:37 AM
|
#1
|
Country: 
|
moblock on Synology NAS - All kernel modules available, but moblock won't start
EDIT jre: dino has made an excellent guide to get moblock running on Synology NAS: http://forum.synology.com/enu/viewto...=16396&p=70227
Hi, I've successfully compiled all kernel modules for my Synology NAS (PPC8533), but when starting moblock I receive the following error:
Code:
Synology> /opt/bin/moblock -d ipfilter.dat moblock.log
* Logging to moblock.log
* Ranges loaded: 248890
* Using .dat file format
* Merged ranges: 0
* Skipped useless ranges: 0
NFNETLINK answers: Invalid argument
Synology>
I've searhed around the forum, and it seems this is a bug. So the suggestion was to download the latest release (0.9r2) and compile it.
I tried to cross compile moblock on my VMware debian machine, but I receive the following error:
Code:
vmware-debian:~/synology/apps/moblock-0.9~rc2# make clean
rm -f *.o *~ *# moblock
vmware-debian:~/synology/apps/moblock-0.9~rc2# make
/root/synology/toolchain/powerpc-linux-gnuspe/bin/powerpc-linux-gnuspe-gcc -Wall -O3 -fomit-frame-pointer -ffast-math -D_GNU_SOURCE -DNFQUEUE -L/root/synology/toolchain/powerpc-linux-gnuspe/include/libipq "-I/root/synology/source/synogpl-844/linux-2.6.24 -mcpu=8548 -mhard-float -mfloat-gprs=double" -c -o MoBlock.o MoBlock.c
MoBlock.c: In function `loadlist_pg2':
MoBlock.c:329: warning: comparison is always true due to limited range of data type
MoBlock.c:330: warning: comparison is always true due to limited range of data type
/root/synology/toolchain/powerpc-linux-gnuspe/bin/powerpc-linux-gnuspe-gcc -Wall -O3 -fomit-frame-pointer -ffast-math -D_GNU_SOURCE -DNFQUEUE -L/root/synology/toolchain/powerpc-linux-gnuspe/include/libipq "-I/root/synology/source/synogpl-844/linux-2.6.24 -mcpu=8548 -mhard-float -mfloat-gprs=double" -c -o rbt.o rbt.c
C -o moblock MoBlock.o rbt.o -lnetfilter_queue -lnfnetlink
make: C: Command not found
make: *** [moblock] Error 127
vmware-debian:~/synology/apps/moblock-0.9~rc2#
My makefile:
Code:
# To use the old-soon-to-be-deprecated libipq interface
# uncomment the following line and comment the NFQUEUE one,
# then comment the gcc line with netfilter_queue and
# uncomment the following one.
#QUEUE_LIB=LIBIPQ
QUEUE_LIB=NFQUEUE
#CFLAGS=-Wall -O3 -march=i586 -mtune=i686 -fomit-frame-pointer -ffast-math \
# -D_GNU_SOURCE -D$(QUEUE_LIB) -L/usr/include/libipq
CFLAGS=-Wall -O3 -fomit-frame-pointer -ffast-math \
-D_GNU_SOURCE -D$(QUEUE_LIB) -L/root/synology/toolchain/powerpc-linux-gnuspe/include/libipq
CFLAGS += -I/root/synology/toolchain/powerpc-linux-gnuspe/include
LDFLAGS+=-L/root/synology/toolchain/powerpc-linux-gnuspe/lib
#CC=gcc
#Syno compiler
CC := /root/synology/toolchain/powerpc-linux-gnuspe/bin/powerpc-linux-gnuspe-gcc
LD := /root/synology/toolchain/powerpc-linux-gnuspe/bin/powerpc-linux-gnuspe-ld
CFLAGS+="-I/root/synology/source/synogpl-844/linux-2.6.24 -mcpu=8548 -mhard-float -mfloat-gprs=double"
all: moblock
moblock: MoBlock.o rbt.o
$CC -o $@ MoBlock.o rbt.o -lnetfilter_queue -lnfnetlink
#gcc -o $@ MoBlock.o rbt.o -lipq
strip $@
moblock-static: MoBlock.o rbt.o
$CC -static -o $@ MoBlock.o rbt.o -lnetfilter_queue -lnfnetlink
#gcc -static -o $@ MoBlock.o rbt.o -lipq
strip $@
clean:
rm -f *.o *~ *# moblock
install:
install -m 755 moblock $(DESTDIR)/usr/bin
.PHONY: clean
Loaded kernel modules:
Code:
Synology> lsmod
Module Size Used by
ip_queue 9616 0
ipt_REJECT 3904 0
ipt_LOG 6720 0
xt_conntrack 2848 0
xt_NFQUEUE 1760 0
xt_state 2272 0
nfnetlink_queue 10240 0
nfnetlink 4088 1 nfnetlink_queue
iptable_filter 2336 1
ip_tables 11848 1 iptable_filter
nf_conntrack_ipv4 8708 0
nf_conntrack 56284 3 xt_conntrack,xt_state,nf_conntrack_ipv4
x_tables 13476 6 ipt_REJECT,ipt_LOG,xt_conntrack,xt_NFQUEUE,xt_state,ip_tables
usbhid 30180 0
hid 35620 1 usbhid
input_core 29612 2 usbhid,hid
usblp 13568 0
usb_storage 44672 0
uhci_hcd 29296 0
ohci_hcd 21860 0
ehci_hcd 38636 0
ds508_synobios 24588 0
sk98lin 220240 0
isofs 34920 0
udf 92524 0
zlib_inflate 15168 1 isofs
fuse 48948 0
nfsd 102952 1
exportfs 4256 1 nfsd
ppp_async 10944 0
crc_ccitt 1696 1 ppp_async
ppp_generic 23508 1 ppp_async
slhc 5824 1 ppp_generic
snd_pcm_oss 46368 0
snd_mixer_oss 18592 1 snd_pcm_oss
snd_usb_audio 93376 0
snd_pcm 82660 2 snd_pcm_oss,snd_usb_audio
snd_timer 22148 1 snd_pcm
snd_hwdep 8356 1 snd_usb_audio
snd_usb_lib 17760 1 snd_usb_audio
snd_rawmidi 23104 1 snd_usb_lib
snd 58740 7 snd_pcm_oss,snd_mixer_oss,snd_usb_audio,snd_pcm,snd_timer,snd_hwdep,snd_rawmidi
snd_page_alloc 9160 1 snd_pcm
soundcore 6756 1 snd
quota_v2 10720 2
usbcore 142856 10 usbhid,usblp,usb_storage,uhci_hcd,ohci_hcd,ehci_hcd,snd_usb_audio,snd_usb_lib
sg 33636 0
ntfs 117028 0
vfat 11872 0
fat 56764 1 vfat
appletalk 33468 0
psnap 3268 1 appletalk
llc 6172 1 psnap
Synology>
Can anyone help me here to CROSS compile moblock. It should be possible since there's already a optware package for PPC v0.8.
Cheers,
Dino
Last edited by jre : 11-14-2009 at 05:42 PM.
Reason: added link to guide
|
|
|
| |
07-21-2009, 05:27 PM
|
#2
|
|
|
Re: moblock on Synology NAS - All kernel modules available, but moblock won't start
I added CODE tags to your post...
Quote:
|
make: C: Command not found
|
I think this is the key to your problrm. Something goes wrong with variable substitution.
Quote:
CFLAGS += -I/root/synology/toolchain/powerpc-linux-gnuspe/include
LDFLAGS+=-L/root/synology/toolchain/powerpc-linux-gnuspe/lib
|
I´m no pro with Makefiles, but maybe you have to remove the spaces around += in the CFLAGS line. I´m quite sure you have to fix something in your Makefile.
EDIT: If you want to run moblock on a low-memory device, then you should consider using NFBlock instead.
EDIT2: You have to take care, that the iptables rules are inserted (iptables -L -nv). MoBlock/NFBlock checks traffic that is sent to the iptables target NFQUEUE. The rules may be inserted manually, by the Moblocjk start script or with "blockcontrol".
__________________
Code:
Please post your logfiles and output of commands wrapped in
[ CODE ] tags. You find them in the advanced editing mode: #
Maintainer of http://moblock-deb.sourceforge.net: MoBlock, mobloquer, blockcontrol and NFBlock Debian packages.
Author of blockcontrol, previously moblock-control.
Last edited by jre : 07-21-2009 at 05:35 PM.
|
|
|
| |
07-22-2009, 03:33 AM
|
#3
|
Country: 
|
Re: moblock on Synology NAS - All kernel modules available, but moblock won't start
Hi, thank you very much for your clear answer! I've successfully compiled moblock now, but when executing it on my nas, I get the following error:
/volume1/public/moblock: error while loading shared libraries: libnetfilter_queue.so.1: cannot open shared object file: No such file or directory
but, all shared_libraries exist on my nas in /opt/lib:
Code:
lrwxrwxrwx 1 root root 12 Jun 12 08:31 libmenu.so -> libmenu.so.5
lrwxrwxrwx 1 root root 14 Jun 12 08:31 libmenu.so.5 -> libmenu.so.5.7
-rwxr-xr-x 1 root root 32340 May 25 11:49 libmenu.so.5.7
lrwxrwxrwx 1 root root 15 Jun 12 08:31 libncurses.so -> libncurses.so.5
lrwxrwxrwx 1 root root 17 Jun 12 08:31 libncurses.so.5 -> libncurses.so.5.7
-rwxr-xr-x 1 root root 285544 May 25 11:49 libncurses.so.5.7
-rwxr-xr-x 1 root root 931 Jun 25 2008 libnetfilter_queue.la
lrwxrwxrwx 1 root root 27 Jul 22 08:15 libnetfilter_queue.so -> libnetfilter_queue.so.1.0.0
lrwxrwxrwx 1 root root 27 Jul 22 08:15 libnetfilter_queue.so.1 -> libnetfilter_queue.so.1.0.0
-rwxr-xr-x 1 root root 6612 Jun 25 2008 libnetfilter_queue.so.1.0.0
-rwxr-xr-x 1 root root 1004 Jun 25 2008 libnetfilter_queue_libipq.la
lrwxrwxrwx 1 root root 34 Jul 22 08:15 libnetfilter_queue_libipq.so -> libnetfilter_queue_libipq.so.1.0.0
lrwxrwxrwx 1 root root 34 Jul 22 08:15 libnetfilter_queue_libipq.so.1 -> libnetfilter_queue_libipq.so.1.0.0
-rwxr-xr-x 1 root root 6008 Jun 25 2008 libnetfilter_queue_libipq.so.1.0.0
-rwxr-xr-x 1 root root 870 Jun 25 2008 libnfnetlink.la
lrwxrwxrwx 1 root root 21 Jul 22 08:14 libnfnetlink.so -> libnfnetlink.so.0.0.0
lrwxrwxrwx 1 root root 21 Jul 22 08:14 libnfnetlink.so.0 -> libnfnetlink.so.0.0.0
-rwxr-xr-x 1 root root 11624 Jun 25 2008 libnfnetlink.so.0.0.0
lrwxrwxrwx 1 root root 13 Jun 12 08:31 libpanel.so -> libpanel.so.5
lrwxrwxrwx 1 root root 15 Jun 12 08:31 libpanel.so.5 -> libpanel.so.5.7
-rwxr-xr-x 1 root root 16928 May 25 11:49 libpanel.so.5.7
lrwxrwxrwx 1 root root 16 Jul 8 14:13 libpcre.so -> libpcre.so.0.0.1
lrwxrwxrwx 1 root root 16 Jul 8 14:13 libpcre.so.0 -> libpcre.so.0.0.1
-rwxr-xr-x 1 root root 162424 Apr 13 20:12 libpcre.so.0.0.1
lrwxrwxrwx 1 root root 19 Jul 8 14:13 libpcrecpp.so -> libpcrecpp.so.0.0.0
Any idea?
|
|
|
| |
07-22-2009, 12:16 PM
|
#4
|
|
|
Re: moblock on Synology NAS - All kernel modules available, but moblock won't start
Hmm, I searched the web and saw that this happened others, too. Once with my first cross-compiled packages and others who had problems with compiling before, too.
I can only guess that it might help to link that file (and perhaps others) to /usr/lib/
Good luck and if you solve it, please post here!
jre
__________________
Code:
Please post your logfiles and output of commands wrapped in
[ CODE ] tags. You find them in the advanced editing mode: #
Maintainer of http://moblock-deb.sourceforge.net: MoBlock, mobloquer, blockcontrol and NFBlock Debian packages.
Author of blockcontrol, previously moblock-control.
|
|
|
| |
07-25-2009, 06:23 AM
|
#6
|
|
|
Re: moblock on Synology NAS - All kernel modules available, but moblock won't start
Congratulations and thanks!
About NFQUEUE: I´ve never heard that the problem was iptables itself. See
Quote:
|
Originally Posted by http://www.netfilter.org/projects/libnetfilter_queue/index.html
What is libnetfilter_queue?
libnetfilter_queue is a userspace library providing an API to packets that have been queued by the kernel packet filter. It is is part of a system that deprecates the old ip_queue / libipq mechanism.
libnetfilter_queue has been previously known as libnfnetlink_queue.
Dependencies
libnetfilter_queue requires libnfnetlink and a kernel that includes the nfnetlink_queue subsystem (i.e. 2.6.14 or later).
|
- So most probably you lack a current kernel (check /boot/config[your kernel] to see if e.g. xt_NFQUEUE (or ipt_NFQUEUE) is enabled.
- Maybe you also need to install nfnetlink_queue additionally to libnetfilter.
- If it´s iptables: in the iptables changelog I found NFQUEUE first mentioned for version 1.3.2
__________________
Code:
Please post your logfiles and output of commands wrapped in
[ CODE ] tags. You find them in the advanced editing mode: #
Maintainer of http://moblock-deb.sourceforge.net: MoBlock, mobloquer, blockcontrol and NFBlock Debian packages.
Author of blockcontrol, previously moblock-control.
|
|
|
| |
08-11-2009, 12:44 PM
|
#8
|
|
|
Re: moblock on Synology NAS - All kernel modules available, but moblock won't start
Please tell me about the problematic parts, and if you´ve found a solution post that, too.
I want to integrate any necessary change. There´s no need that you have to do that again for every new version.
A good start should be the README. If you have any questions, just ask.
__________________
Code:
Please post your logfiles and output of commands wrapped in
[ CODE ] tags. You find them in the advanced editing mode: #
Maintainer of http://moblock-deb.sourceforge.net: MoBlock, mobloquer, blockcontrol and NFBlock Debian packages.
Author of blockcontrol, previously moblock-control.
|
|
|
| |
08-12-2009, 06:12 PM
|
#10
|
|
|
Re: moblock on Synology NAS - All kernel modules available, but moblock won't start
That looks like the normal successful startup messages. They should end up in /var/log/moblock.log.
Although sometimes I saw them in blockcontrol.log, too, but I changed that in my current working copy.
So where do you get it (terminal? logfile?)? How did you start it? Does it really hang?
__________________
Code:
Please post your logfiles and output of commands wrapped in
[ CODE ] tags. You find them in the advanced editing mode: #
Maintainer of http://moblock-deb.sourceforge.net: MoBlock, mobloquer, blockcontrol and NFBlock Debian packages.
Author of blockcontrol, previously moblock-control.
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 09:14 PM.
 |
|
 |
|
 |