LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-08-2012, 08:01 PM   #1
michijo
Member
 
Registered: Apr 2011
Posts: 162

Rep: Reputation: 0
Installing Iplist/Ipblock


I am interested in installing iplist/ipblock. It is available as source, but I am not sure I have resolved the dependencies properly. It starts to make but fails. I intended to build a package using this guide:

http://altctrlbackspace.blogspot.com...om-source.html

Looks like this when it fails to make:

Code:
g++ -O2 -Wall -Wextra -std=c++98 -D_REENTRANT -DNDEBUG -I include -c src/nfq.cc
src/nfq.cc: In static member function ‘static int nfq::nfq_hook::cb(nfq_q_handle*, nfgenmsg*, nfq_data*, void*)’:
src/nfq.cc:104: error: invalid conversion from ‘char**’ to ‘unsigned char**’
src/nfq.cc:104: error:   initializing argument 2 of ‘int nfq_get_payload(nfq_data*, unsigned char**)’
src/nfq.cc:125: warning: ‘int nfq_set_verdict_mark(nfq_q_handle*, u_int32_t, u_int32_t, u_int32_t, u_int32_t, const unsigned char*)’ is deprecated (declared at /usr/include/libnetfilter_queue/libnetfilter_queue.h:73)
src/nfq.cc:125: warning: ‘int nfq_set_verdict_mark(nfq_q_handle*, u_int32_t, u_int32_t, u_int32_t, u_int32_t, const unsigned char*)’ is deprecated (declared at /usr/include/libnetfilter_queue/libnetfilter_queue.h:73)
src/nfq.cc:132: warning: ‘int nfq_set_verdict_mark(nfq_q_handle*, u_int32_t, u_int32_t, u_int32_t, u_int32_t, const unsigned char*)’ is deprecated (declared at /usr/include/libnetfilter_queue/libnetfilter_queue.h:73)
src/nfq.cc:132: warning: ‘int nfq_set_verdict_mark(nfq_q_handle*, u_int32_t, u_int32_t, u_int32_t, u_int32_t, const unsigned char*)’ is deprecated (declared at /usr/include/libnetfilter_queue/libnetfilter_queue.h:73)
src/nfq.cc: In static member function ‘static void nfq::nfq_hook::print_pkt(std::string, int8_t, nfq_data*, nfqnl_msg_packet_hdr*)’:
src/nfq.cc:152: error: invalid conversion from ‘char**’ to ‘unsigned char**’
src/nfq.cc:152: error:   initializing argument 2 of ‘int nfq_get_payload(nfq_data*, unsigned char**)’
make: *** [nfq.o] Error 1
 
Old 02-09-2012, 12:39 AM   #2
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
That's not a dependency-related error. It's simply compiler errors from code which is no longer valid with your compiler version. Look for patches which fix the problem from fedora, LFS or ubuntu.
Found this on ARCH:
http://aur.archlinux.org/packages/ip.../iplist.tar.gz
It contains the patch you need(nfq.patch)
 
Old 02-09-2012, 01:46 PM   #3
michijo
Member
 
Registered: Apr 2011
Posts: 162

Original Poster
Rep: Reputation: 0
deprecated

Quote:
Originally Posted by gnashley View Post
That's not a dependency-related error. It's simply compiler errors from code which is no longer valid with your compiler version. Look for patches which fix the problem from fedora, LFS or ubuntu.
Found this on ARCH:
http://aur.archlinux.org/packages/ip.../iplist.tar.gz
It contains the patch you need(nfq.patch)
Okay, I have that patch now, but not sure how to apply it. I dropped it into the src folder of iplist, but this fails to make.

I suppose it's the fact that make returns the word "deprecated", that lets you know its related to outdated code, and to seek out a patch? I looked through the nfq.cc but saw no relative way to apply the contents of the patch.

Thanks for your help. I normally dont have trouble with software making and have installed other things like eclipse and swftools without problem.

Last edited by michijo; 02-09-2012 at 01:49 PM.
 
Old 02-09-2012, 01:59 PM   #4
michijo
Member
 
Registered: Apr 2011
Posts: 162

Original Poster
Rep: Reputation: 0
Actually I just tried dropping the entire iplist.tar.gz with the patch in it in the main folder of the iplist I was trying to make, and it seems to have finished making. Now it returns only:

Quote:
make: Nothing to be done for `all'.
 
Old 02-09-2012, 02:25 PM   #5
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,098

Rep: Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175
tried it now: you can also just substitute the original src/nfq.cc file with the one from the archlinux tar.gz.

or, to apply the patch, from the iplist source folder
Code:
patch src/nfq.cc /path/to/nfq.patch
(as you can read also in the PKGBUILD file )

remember that you need these two dependencies: libnfnetlink and libnetfilter_queue.

Last edited by ponce; 02-09-2012 at 02:36 PM.
 
Old 02-09-2012, 04:51 PM   #6
michijo
Member
 
Registered: Apr 2011
Posts: 162

Original Poster
Rep: Reputation: 0
it installs fine now, but running ipblock -g gets this error:

Code:
usr/sbin/ipblock: linio 420: LOG_IPTABLES: unreadable variable
 
Old 02-13-2012, 04:57 PM   #7
michijo
Member
 
Registered: Apr 2011
Posts: 162

Original Poster
Rep: Reputation: 0
I feel like iplist is running and installed, but that IPblock will not work. Ipblock returns a list of options when run as su:

Quote:
IPblock 0.29
Copyright (C) 2010 Serkan Sakar <uljanow@users.sourceforge.net>

Usage: ipblock [options]

Options:
-s start blocking
-d stop blocking
-r restart IPblock
-i restart iptables rules
-p restart iplist
-u update lists
-c convert lists to ipl format
-g start IPblock GUI
-l show status
-v show version and exit
-h show this help
So I feel like it is installed, but all of these options returns the same error:

Quote:
/usr/sbin/ipblock: line 420: LOG_IPTABLES: unreadable variable
I looked into this file, and in fact there is a variable on line 420 called used called LOG_IPTABLES. You know, I looked everywhere in this file, but no where is this variable declared, so maybe it cant read it, simply because it was never declared! I really dont know. I am fairly good at software compilation. I just upgraded and compiled the 3.2.5 kernel manually and enjoyed doing so.

This may be an ipblock problem. perhaps not for this forum.

Last edited by michijo; 02-13-2012 at 05:03 PM.
 
Old 02-13-2012, 05:12 PM   #8
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,098

Rep: Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175
Try with the slackware stock kernel, it can be you're missing some iptables modules in your custom one (just a guess).
 
Old 02-13-2012, 05:33 PM   #9
michijo
Member
 
Registered: Apr 2011
Posts: 162

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ponce View Post
Try with the slackware stock kernel, it can be you're missing some iptables modules in your custom one (just a guess).
or maybe when running "make oldconfig" I skipped some integral question related to iptables. I am reading up on iptables now to make sure I am not missing something. IPblock failed to work both before and after kernel upgrade. But iplist seems to. I thought it was something to do with java, jre, or some ipblock conf file. Could be a lot of things. I think it is iptables module as you say.
 
Old 02-13-2012, 10:48 PM   #10
michijo
Member
 
Registered: Apr 2011
Posts: 162

Original Poster
Rep: Reputation: 0
I am not concerned about this program so much! I just helped someone install it on Ubuntu the other day, as they felt they were being monitored for torrent downloads. Then I tried to install it on Slackware just for fun really. I dont need it. Slackware works for me 99% of the time. I managed to install Xmonad and many other things without trouble.
 
  


Reply



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
My first question, "Why does Iplist/Ipblock need a password? Alnitak Linux - Newbie 3 09-17-2010 12:51 AM
ipblock in opensuse 11 threatingbehaviour Linux - Newbie 0 06-02-2009 02:51 AM
ipblock seems to be malfunctioning DarkPlexus Linux - Software 1 02-18-2008 08:35 AM
ipblock default behavior FolkTheory Linux - Security 3 12-01-2007 12:30 PM
iplist for amule devil28 Linux - Software 0 07-07-2005 10:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:41 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
Open Source Consulting | Domain Registration