Libwrap problem

12 posts / 0 new
Last post
#1 Tue, 12/13/2011 - 19:01
fut08-15

Libwrap problem

Hi

my first post here. Been using Virtualmin/Webmin on a Centos VPS since a while now and frequently visited this site for help. But for this issue I can't find anything:

I tried to enable IP Access Control in Usermin/webmin configuration but there is a message which says:

===

IP access control using TCP-wrappers is not available, as the Authen::Libwrap Perl module is not installed. Click here to have Webmin automatically install the missing Perl module.

===

When I clicked the link the result was:

===

Making and installing Authen::Libwrap ..

Untarring module file

Executing gunzip -c /tmp/.webmin/Authen-Libwrap-0.22.tar.gz | tar xvf - ..

Authen-Libwrap-0.22 Authen-Libwrap-0.22/Build.PL Authen-Libwrap-0.22/ChangeLog Authen-Libwrap-0.22/example.pl Authen-Libwrap-0.22/Makefile.PL Authen-Libwrap-0.22/MANIFEST Authen-Libwrap-0.22/META.yml Authen-Libwrap-0.22/ppport.h Authen-Libwrap-0.22/README Authen-Libwrap-0.22/lib Authen-Libwrap-0.22/lib/Authen Authen-Libwrap-0.22/lib/Authen/Libwrap.pm Authen-Libwrap-0.22/lib/Authen/Libwrap.xs Authen-Libwrap-0.22/t Authen-Libwrap-0.22/t/01_inline.t Authen-Libwrap-0.22/t/02_maintainer.t Authen-Libwrap-0.22/t/03_pod.t tar: Read 2048 bytes from - Authen-Libwrap-0.22/t/hosts.allow

Compiling module

Executing /usr/bin/perl Makefile.PL && make ..

This module requires Module::Build to install itself. Install Module::Build now from CPAN? [y] y CPAN: Storable loaded ok Going to read /root/.cpan/Metadata Database was generated on Tue, 22 Nov 2011 03:31:07 GMT CPAN: LWP::UserAgent loaded ok Fetching with LWP: ftp://ftp.perl.org/pub/CPAN/authors/01mailrc.txt.gz Going to read /root/.cpan/sources/authors/01mailrc.txt.gz CPAN: Compress::Zlib loaded ok Fetching with LWP: ftp://ftp.perl.org/pub/CPAN/modules/02packages.details.txt.gz Going to read /root/.cpan/sources/modules/02packages.details.txt.gz Database was generated on Tue, 13 Dec 2011 14:38:48 GMT

There's a new CPAN.pm version (v1.9800) available! [Current version is v1.7602] You might want to try install Bundle::CPAN reload cpan without quitting the current session. It should be a seamless upgrade while we are running...

Fetching with LWP: ftp://ftp.perl.org/pub/CPAN/modules/03modlist.data.gz Going to read /root/.cpan/sources/modules/03modlist.data.gz Going to write /root/.cpan/Metadata Running install for module Module::Build::Compat Running make for D/DA/DAGOLDEN/Module-Build-0.3800.tar.gz Fetching with LWP: ftp://ftp.perl.org/pub/CPAN/authors/id/D/DA/DAGOLDEN/Module-Build-0.3800... CPAN: Digest::MD5 loaded ok Fetching with LWP: ftp://ftp.perl.org/pub/CPAN/authors/id/D/DA/DAGOLDEN/CHECKSUMS Checksum for /root/.cpan/sources/authors/id/D/DA/DAGOLDEN/Module-Build-0.3800.tar.gz ok Scanning cache /root/.cpan/build for sizes Uncompressed /root/.cpan/sources/authors/id/D/DA/DAGOLDEN/Module-Build-0.3800.tar.gz successfully Using Tar:/bin/tar xvf /root/.cpan/sources/authors/id/D/DA/DAGOLDEN/Module-Build-0.3800.tar: Couldn't untar /root/.cpan/sources/authors/id/D/DA/DAGOLDEN/Module-Build-0.3800.tar

Installation of Authen::Libwrap failed. Check the output above and try installing manually. You can also install the module from CPAN with the command perl -MCPAN -e shell.

===

I searched the Virtualmin forum and found another entry which suggested to run

yum install tcp_wrappers

===

However, when I do so the result is:

Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.switch.ch * extras: mirror.switch.ch * updates: mirror.silyus.net Setting up Install Process Package tcp_wrappers-7.6-40.7.el5.i386 already installed and latest version Nothing to do

Could someone please point me to a solution for this?

Thanks

Christian

Wed, 12/14/2011 - 07:51
andreychek

Howdy,

It's possible that you'd need to install that package from the command line.

You can do that with this command:

perl -MCPAN -e 'install Authen::Libwrap

Some modules require manual input during the installation process, and break Virtualmin's attempt to automatically install them.

-Eric

Wed, 12/14/2011 - 08:45
fut08-15

Dear Eric

tried

perl -MCPAN -e 'install Authen::Libwrap

but result was

syntax error at -e line 2, near "MCPAN -e " Execution of -e aborted due to compilation errors.

Came across this site:

http://myvpsbox.com/blog/2009/08/08/must-install-webmin/

where they recommended:

Notes: ExtUtils:Cbuilder is necessary because you will experience problems trying to install Authen::Libwrap.

when I try this first the result is:

perl -MCPAN -e 'install ExtUtils::CBuilder' CPAN: Storable loaded ok Going to read /root/.cpan/Metadata Database was generated on Tue, 13 Dec 2011 14:38:48 GMT Running install for module ExtUtils::CBuilder Running make for D/DA/DAGOLDEN/ExtUtils-CBuilder-0.280202.tar.gz CPAN: LWP::UserAgent loaded ok Fetching with LWP: ftp://ftp.perl.org/pub/CPAN/authors/id/D/DA/DAGOLDEN/ExtUtils-CBuilder-0... CPAN: Digest::MD5 loaded ok CPAN: Compress::Zlib loaded ok Checksum for /root/.cpan/sources/authors/id/D/DA/DAGOLDEN/ExtUtils-CBuilder-0.280202.tar.gz ok Scanning cache /root/.cpan/build for sizes ExtUtils-CBuilder-0.280202 ExtUtils-CBuilder-0.280202/README ExtUtils-CBuilder-0.280202/Changes ExtUtils-CBuilder-0.280202/LICENSE ExtUtils-CBuilder-0.280202/dist.ini ExtUtils-CBuilder-0.280202/META.yml ExtUtils-CBuilder-0.280202/MANIFEST ExtUtils-CBuilder-0.280202/META.json ExtUtils-CBuilder-0.280202/t ExtUtils-CBuilder-0.280202/t/02-link.t ExtUtils-CBuilder-0.280202/t/04-base.t ExtUtils-CBuilder-0.280202/Makefile.PL ExtUtils-CBuilder-0.280202/t/01-basic.t ExtUtils-CBuilder-0.280202/README.patching ExtUtils-CBuilder-0.280202/t/03-cplusplus.t ExtUtils-CBuilder-0.280202/xt/release ExtUtils-CBuilder-0.280202/xt/release/eol.t ExtUtils-CBuilder-0.280202/t/00-have-compiler.t ExtUtils-CBuilder-0.280202/xt/release/pod-syntax.t ExtUtils-CBuilder-0.280202/lib/ExtUtils ExtUtils-CBuilder-0.280202/lib/ExtUtils/CBuilder.pm ExtUtils-CBuilder-0.280202/lib/ExtUtils/CBuilder ExtUtils-CBuilder-0.280202/lib/ExtUtils/CBuilder/Base.pm ExtUtils-CBuilder-0.280202/lib/ExtUtils/CBuilder/Platform ExtUtils-CBuilder-0.280202/lib/ExtUtils/CBuilder/Platform/VMS.pm ExtUtils-CBuilder-0.280202/lib/ExtUtils/CBuilder/Platform/aix.pm ExtUtils-CBuilder-0.280202/lib/ExtUtils/CBuilder/Platform/os2.pm ExtUtils-CBuilder-0.280202/lib/ExtUtils/CBuilder/Platform/Unix.pm ExtUtils-CBuilder-0.280202/lib/ExtUtils/CBuilder/Platform/cygwin.pm ExtUtils-CBuilder-0.280202/lib/ExtUtils/CBuilder/Platform/darwin.pm ExtUtils-CBuilder-0.280202/lib/ExtUtils/CBuilder/Platform/Windows.pm ExtUtils-CBuilder-0.280202/lib/ExtUtils/CBuilder/Platform/dec_osf.pm ExtUtils-CBuilder-0.280202/lib/ExtUtils/CBuilder/Platform/Windows ExtUtils-CBuilder-0.280202/lib/ExtUtils/CBuilder/Platform/Windows/BCC.pm ExtUtils-CBuilder-0.280202/lib/ExtUtils/CBuilder/Platform/Windows/GCC.pm ExtUtils-CBuilder-0.280202/lib/ExtUtils/CBuilder/Platform/Windows/MSVC.pm /bin/tar: Read 3072 bytes from -

CPAN.pm: Going to build D/DA/DAGOLDEN/ExtUtils-CBuilder-0.280202.tar.gz

ExtUtils::MakeMaker version 6.31 required--this is only version 6.30 at Makefile.PL line 7. BEGIN failed--compilation aborted at Makefile.PL line 7. Running make test Make had some problems, maybe interrupted? Won't test Running make install Make had some problems, maybe interrupted? Won't install

I installed my virtualmin on a "naked" Centos VPS. All other features on the system were added/installed through the virtualmin interface. Only customization I have done is that one of the websites hosted there has an SSL cert installed. I use this for logging in as well, just ignore the cert error, as I know it's mine.

The VPS is up and running since approx. 6 months now and never caused any problems. I regularily updated the system via virtualmin and that also works well.

I recently nocticed from logfiles that someone constantly tries to get access to a website admin interface which should only be accessible from my own IP (I entered my IP into Usermin and Webmin configuration as the only allowed address, but the other guy keeps returning 10-15 times a day)

Is this DAGOLDEN/ExtUtils-CBuilder known for causing issues?

Regards

Christian

Wed, 12/14/2011 - 09:13
andreychek

Perl modules are generally pretty safe to install -- if you read somewhere that this particular module might help the issue, it's certainly worth trying.

That said -- if this is all because you're looking to block a single IP address, there may be a simpler way to do that.

This command here can block an IP address so that they can't reach your server:

route add -host 1.2.3.4 reject

Where "1.2.3.4" is the IP address of the system you're looking to block.

-Eric

Wed, 12/14/2011 - 09:32
fut08-15

Dear Eric

the route add command worked ! Such a simple solution.

Thanks a million

Christian

Wed, 12/21/2011 - 12:12
mdtiberi

I also cannot install as well. Comes up with the following error from Webmin:

====================== Compiling module

Executing /usr/bin/perl Makefile.PL && make ..

running Build.PL

/usr/bin/perl Build.PL enter include directory to use: [/usr/include ]/usr/include enter library directory to use: [/usr/lib ]/usr/lib - ERROR: Test::Exception is not installed

ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions of the modules indicated above before proceeding with this installation

Checking whether your kit is complete... Looks good

Checking prerequisites... Creating new 'Build' script for 'Authen-Libwrap' version '0.22' /usr/bin/perl Build --makefile_env_macros 1 Copying lib/Authen/Libwrap.pm -> blib/lib/Authen/Libwrap.pm lib/Authen/Libwrap.xs -> lib/Authen/Libwrap.c Error: Function definition too short '/ * EOF * /' in Libwrap.xs, line 32 gcc -I/usr/lib64/perl5/CORE -DXS_VERSION="0.22" -DVERSION="0.22" -fPIC -I/usr/include -c -D_REENTRAN T -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURC E -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector - -param=ssp-buffer-size=4 -m64 -mtune=generic -o lib/Authen/Libwrap.o lib/Authen/Libwrap.c lib/Authen/Libwrap.xs:9:18: error: tcpd.h: No such file or directory lib/Authen/Libwrap.xs: In function 'XS_Authen__Libwrap__hosts_ctl': lib/Authen/Libwrap.xs:24: warning: implicit declaration of function 'hosts_ctl' error building lib/Authen/Libwrap.o from 'lib/Authen/Libwrap.c' at /usr/share/perl5/ExtUtils/CBuilde r/Base.pm line 112. make: *** [all] Error 2

Installation of Authen::Libwrap failed. Check the output above and try installing manually.

You can also install the module from CPAN with the command perl -MCPAN -e shell.

Tried installing from the command line but I dont know what to put into the prompts. Ditro is CentOS 6.2

Thanks

Wed, 12/21/2011 - 13:34
andreychek

It looks like the fatal error you're getting is this:

error: tcpd.h: No such file or directory

Doing some Googling, it looks like the file tcpd.h is included in the package named " tcp_wrappers-devel".

So, you'd need to first install that package, which you can do with this command:

yum install tcp_wrappers-devel

Thu, 12/22/2011 - 17:52
fut08-15

But that person now returns from different email addresses...

Had a look at the previous posts, as I wanted to learn something from them, but I also failed in getting the TCP wrappers installed, here is what my VPS returned:

perl -MCPAN -e shell Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.7602) ReadLine support available (try 'install Bundle::CPAN')

cpan>

Like mdtiberi I have no idea what to enter there

Thu, 12/22/2011 - 17:55
fut08-15

yum install tcp_wrappers-devel

returns here:

Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.switch.ch * extras: mirror.switch.ch * updates: mirror.switch.ch base | 1.1 kB 00:00 extras | 2.1 kB 00:00 updates | 1.9 kB 00:00 virtualmin | 1.2 kB 00:00 virtualmin-universal | 1.2 kB 00:00 vz-base | 951 B 00:00 vz-updates | 951 B 00:00 Setting up Install Process No package tcp_wrappers-devel available. Nothing to do

Fri, 12/23/2011 - 08:41
andreychek

Try this command to figure out the name of the package that you need:

yum whatprovides tcpd.h

Mon, 10/07/2013 - 19:27
CEEWorld

Ubuntu will need these installed to work

apt-get install libwrap0 libwrap0-dev

hope that helps Ubuntu users

Mon, 02/27/2017 - 01:45
CEEWorld

To install you also need some other perl dependencies installed first

Module::Build Test::Exception

Topic locked