LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-30-2009, 02:38 AM   #1
threatingbehaviour
Member
 
Registered: May 2009
Location: mt vernon ohio
Distribution: opensuse 11.3
Posts: 129

Rep: Reputation: 15
MoBlock install problems


ok I'm trying to install moblock so I follow the directions and run "make" and I get a big string of error messages ok so I open the make file....

# 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 -O2 -march=i586 -mtune=i686 -fomit-frame-pointer -ffast-math \
-D_GNU_SOURCE -D$(QUEUE_LIB) -L/usr/include/libipq
CC=gcc

all: moblock


moblock: MoBlock.o rbt.o
gcc -o $@ MoBlock.o rbt.o -lnetfilter_queue -lnfnetlink
#gcc -o $@ MoBlock.o rbt.o -lipq
strip $@

moblock-static: MoBlock.o rbt.o
gcc -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

so what are the "following lines" and comment the "NFQUEUE" with what? (I'm assuming this is what I have to do because like I said when I run make I just get a big string of error messages) any suggestions
 
Old 05-30-2009, 02:40 AM   #2
threatingbehaviour
Member
 
Registered: May 2009
Location: mt vernon ohio
Distribution: opensuse 11.3
Posts: 129

Original Poster
Rep: Reputation: 15
and this is the error message I get when I run make....
gcc -Wall -O2 -march=i586 -mtune=i686 -fomit-frame-pointer -ffast-math -D_GNU_SOURCE -DNFQUEUE -L/usr/include/libipq -c -o MoBlock.o MoBlock.c
In file included from /usr/include/linux/netfilter_ipv4.h:8,
from MoBlock.c:35:
/usr/include/linux/netfilter.h:40: error: expected specifier-qualifier-list before ‘__u32’
MoBlock.c:46:52: error: libnetfilter_queue/libnetfilter_queue.h: No such file or directory
MoBlock.c:377: warning: ‘struct nfq_data’ declared inside parameter list
MoBlock.c:377: warning: its scope is only this definition or declaration, which is probably not what you want
MoBlock.c:377: warning: ‘struct nfgenmsg’ declared inside parameter list
MoBlock.c:377: warning: ‘struct nfq_q_handle’ declared inside parameter list
MoBlock.c: In function ‘nfqueue_cb’:
MoBlock.c:384: warning: implicit declaration of function ‘nfq_get_msg_packet_hdr’
MoBlock.c:384: warning: assignment makes pointer from integer without a cast
MoBlock.c:386: error: dereferencing pointer to incomplete type
MoBlock.c:387: warning: implicit declaration of function ‘nfq_get_payload’
MoBlock.c:389: error: dereferencing pointer to incomplete type
MoBlock.c:392: warning: implicit declaration of function ‘nfq_set_verdict’
MoBlock.c: In function ‘netlink_loop’:
MoBlock.c:497: warning: implicit declaration of function ‘nfq_open’
MoBlock.c:497: warning: assignment makes pointer from integer without a cast
MoBlock.c:503: warning: implicit declaration of function ‘nfq_unbind_pf’
MoBlock.c:508: warning: implicit declaration of function ‘nfq_bind_pf’
MoBlock.c:514: warning: implicit declaration of function ‘nfq_create_queue’
MoBlock.c:514: warning: assignment makes pointer from integer without a cast
MoBlock.c:520: warning: implicit declaration of function ‘nfq_set_mode’
MoBlock.c:520: error: ‘NFQNL_COPY_PACKET’ undeclared (first use in this function)
MoBlock.c:520: error: (Each undeclared identifier is reported only once
MoBlock.c:520: error: for each function it appears in.)
MoBlock.c:525: warning: implicit declaration of function ‘nfq_nfnlh’
MoBlock.c:525: warning: assignment makes pointer from integer without a cast
MoBlock.c:526: warning: implicit declaration of function ‘nfnl_fd’
MoBlock.c:529: warning: implicit declaration of function ‘nfq_handle_packet’
MoBlock.c:533: warning: implicit declaration of function ‘nfq_destroy_queue’
MoBlock.c:534: warning: implicit declaration of function ‘nfq_close’
make: *** [MoBlock.o] Error 1
 
Old 05-30-2009, 03:09 AM   #3
Samotnik
Member
 
Registered: Jun 2006
Location: Belarus
Distribution: Debian GNU/Linux testing/unstable
Posts: 471

Rep: Reputation: 40
It means you shoult uncomment line with LIBIPQ, and comment one witn NFQUEUE
Code:
QUEUE_LIB=LIBIPQ
#QUEUE_LIB=NFQUEUE
 
Old 05-30-2009, 03:13 AM   #4
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
The first error means you need to install libnetfilter-queue-dev or whatever the equivalent package is called in OpenSUSE.
cheers,
jdk
 
Old 05-30-2009, 05:40 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,705

Rep: Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294
Quote:
..error:libnetfilter_queue/libnetfilter_queue.h:No such file or..
No package in the repo ( # zypper se netfilter ),
but there is a Suse 11 package here
http://rpm.pbone.net/index.php3/stat....i586.rpm.html
> libnetfilter_queue-devel-0.0.17-jen0.i586.rpm
Depends on libnetfilter_queue1
http://rpm.pbone.net/index.php3/stat....i586.rpm.html
> libnetfilter_queue1-0.0.17-jen0.i586.rpm
which depends on libnfnetlink0
http://rpm.pbone.net/index.php3/stat....i586.rpm.html
> libnfnetlink0-0.0.41-jen0.i586.rpm
... All together 26 KB !
( http://rpm.pbone.net > > Search > "Advanced Search" )

Please install with # rpm -Uvh <package> <package> <package>
... to get /usr/include/libnetfilter_queue/libnetfilter_queue.h
There is a libnfnetlink-devel-0.0.41-jen0.i586.rpm ( also required ) here
http://rpm.pbone.net/index.php3/stat....i586.rpm.html

.....
Good luck !
.....

Last edited by knudfl; 05-30-2009 at 06:36 AM.
 
Old 05-30-2009, 01:01 PM   #6
threatingbehaviour
Member
 
Registered: May 2009
Location: mt vernon ohio
Distribution: opensuse 11.3
Posts: 129

Original Poster
Rep: Reputation: 15
ok I did this and this is the message I get...

gcc -Wall -O2 -march=i586 -mtune=i686 -fomit-frame-pointer -ffast-math -D_GNU_SOURCE -DNFQUEUE -L/usr/include/libipq -c -o MoBlock.o MoBlock.c
In file included from /usr/include/linux/netfilter_ipv4.h:8,
from MoBlock.c:35:
/usr/include/linux/netfilter.h:40: error: expected specifier-qualifier-list before __u32
make: *** [MoBlock.o] Error 1
 
Old 05-30-2009, 02:54 PM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,705

Rep: Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294
Well, the test I made this morning, was on Suse 11.1,
kernel 2.6.27.5 . Suse 11, kernel 2.5.25.xx : the kernel
headers in /usr/include/linux are 2.6.25.5, and three
of the required headers are different from other
versions or missing ( compiler.h ).
MoBlock may compile on anything else but Suse11/2.6.25.

Suggest : use the static package
http://download.berlios.de/moblock/M...c-i586.tar.bz2
Quote:
The static version was compiled on Slackware 10.2 with gcc 3.4.5, if you
don't want to install the libnetfilter libraries try it, just rename it
to "moblock".
( There is a work around, using 2.6.27.x headers in Moblock-0.8/,
linux-2.6.27.x/include/linux/netfilter_ipv4.h, netfilter.h, compiler.h,
and changing some lines from #include </linux/file.h> to
#include "file.h" .)
.....

Last edited by knudfl; 05-30-2009 at 03:08 PM.
 
Old 05-30-2009, 04:07 PM   #8
threatingbehaviour
Member
 
Registered: May 2009
Location: mt vernon ohio
Distribution: opensuse 11.3
Posts: 129

Original Poster
Rep: Reputation: 15
I did use the static version the only difference is the static version comes with a executable file named moblock-static

There is a work around, using 2.6.27.x headers in Moblock-0.8/,
linux-2.6.27.x/include/linux/netfilter_ipv4.h, netfilter.h, compiler.h,
and changing some lines from #include </linux/file.h> to
#include "file.h

and you'll have to be more specific on how to do this as I have only been using linux for about a month so alot of this is still new to me
 
Old 05-30-2009, 05:24 PM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,705

Rep: Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294
No need to compile MoBlock, the static 'moblock' is OK,
just rename it as quoted above.

But here it is :

Copy headers e.g. linux-2.6.27.2/include/linux/netfilter_ipv4.h,
netfilter.h, compiler.h
to your source code folder Moblock-0.8/

Edit MoBlock.c line 35, #include <linux/netfilter_ipv4.h>
to #include "netfilter_ipv4.h"

Edit netfilter_ipv4.h line??, #include <linux/netfilter.h>
to #include "netfilter.h"

Edit netfilter.h line??, #include <linux/compiler.h>
to #include "compiler.h"
.....
Line numbers will depend on header version.
.....
P.S.: A Linux OS with 2.6.26.8 headers works too,
pclos2009 was used.
.....

Last edited by knudfl; 05-30-2009 at 05:38 PM.
 
Old 05-30-2009, 06:41 PM   #10
threatingbehaviour
Member
 
Registered: May 2009
Location: mt vernon ohio
Distribution: opensuse 11.3
Posts: 129

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by knudfl View Post

Copy headers e.g. linux-2.6.27.2/include/linux/netfilter_ipv4.h,
netfilter.h, compiler.h
to your source code folder Moblock-0.8/

Edit netfilter_ipv4.h line??, #include <linux/netfilter.h>
to #include "netfilter.h"

Edit netfilter.h line??, #include <linux/compiler.h>
to #include "compiler.h"
.....

.....
I'm sorry I don't understand these directions I mean you have to be REALLY REALLY specific I'm like a virgin who's never even seen a naked lady when it comes to this...or do you mean just copy the whole netfilter.h,ect,ect to the source code file? because I'm looking at the netfilter.h file right now and I don't see #include lines...or do I add the include lines to the netfilter.h file? I'm confused hope you don't get too irritated with all these questions

Last edited by threatingbehaviour; 05-31-2009 at 02:09 AM.
 
Old 05-31-2009, 03:08 AM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,705

Rep: Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294
Sorry ... then no need to do complicated stuff.

Please use MoBlock-0.8-static-i586, no reason
not to use a package (static). Is meant to be used ..
.....

The modifying example: The idea is to use headers
( files.h ) from a different kernel source, which
you probably haven't got in your archive.
( Linux source code : http://www.kernel.org/ )
.....
Attached Files
File Type: txt MoBlock.c.txt (17.6 KB, 9 views)

Last edited by knudfl; 11-12-2009 at 02:53 PM.
 
Old 05-31-2009, 03:34 AM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,705

Rep: Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294
..... Please rename files to " .h "
.....
Attached Files
File Type: txt compiler.h.txt (5.4 KB, 6 views)
File Type: txt netfilter.h.txt (10.6 KB, 7 views)

Last edited by knudfl; 11-12-2009 at 02:55 PM.
 
Old 06-01-2009, 01:39 AM   #13
threatingbehaviour
Member
 
Registered: May 2009
Location: mt vernon ohio
Distribution: opensuse 11.3
Posts: 129

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by knudfl View Post

The modifying example: The idea is to use headers
( files.h ) from a different kernel source, which
you probably haven't got in your archive.
( Linux source code : http://www.kernel.org/ )
.....
I'm really very sorry I know your really trying to help me I just don't understand I downloaded the "patch-2.6.29.4 and I have no idea how you got headers out of it (complier.h) and the file type of patch-2.6.. is "differences between files" what does that mean? should I update my kernel? and if so how should I go about doing this and also I have done what you have said yet I get nothing when I click on the moblock-static executiable file...
P.S according to the maker MoBlock wont work with kernels 2.6.23 or newer (http://www.ngohq.com/general-softwar...for-linux.html) you should email the developers and tell them of your work I think they'd love to hear from you

Last edited by threatingbehaviour; 06-01-2009 at 03:54 AM.
 
Old 06-01-2009, 06:57 AM   #14
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,705

Rep: Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294Reputation: 3294
No need to download any "-2.6.29.4", may be of no use.
Who says headers from 2.6.29.4 would work ?
A patch most often is a text file, the whole linux-2.6.29
is a 54 MB file, 321 MB when unpacked.

The 3 headers, you want ( 2 modified ) are attached, post # 12.
Click them, and you have them.
Origin : 2.6.27.2 .
.....
And I can repeat :
"No need to compile MoBlock, the static 'moblock' is OK,
just rename it as quoted above." ( see post #7 ).
.....

Last edited by knudfl; 06-01-2009 at 06:59 AM.
 
Old 06-02-2009, 01:41 AM   #15
threatingbehaviour
Member
 
Registered: May 2009
Location: mt vernon ohio
Distribution: opensuse 11.3
Posts: 129

Original Poster
Rep: Reputation: 15
oh wait moblock doesn't have a graphical interface shit sorry for my absent mindedness

Last edited by threatingbehaviour; 06-02-2009 at 01:46 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to install Wine, getting error possibly due to Moblock. DemonKyoto Linux - Newbie 2 10-04-2008 11:53 AM
Anybody tried MoBlock with Slackware 12.1? Slackovado Slackware 0 06-17-2008 02:31 PM
Quick question regarding Recent MoBlock install MikeOfAustin Linux - Software 1 05-03-2008 06:26 AM
Trying to make a GUI for Moblock CoffeeKing!!! Linux - Software 2 03-27-2008 08:17 AM
Shorewall + Moblock? opioid Linux - Security 2 12-11-2007 12:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration