CSF and gentoo

Post Reply
Kurogane
Junior Member
Posts: 9
Joined: 13 Mar 2009, 04:08

CSF and gentoo

Post by Kurogane »

I've problem to install csf in gentoo i'm getting this error "Error: /sbin/ifconfig (ifconfig binary location) -v does not exist!, at line 2161"

root@server# sh install.generic.sh
Installing generic csf and lfd

Check we're running as root

Checking Perl modules...mode of 'os.pl' changed from 0755 (rwxr-xr-x) to 0700 (rwx------)
Configuration modified for Debian/Ubuntu/Gentoo settings /etc/csf/csf.conf
ok

mkdir: created directory '/etc/csf'
mkdir: created directory '/var/lib/csf'
mkdir: created directory '/usr/local/csf'
mkdir: created directory '/var/lib/csf/Geo'
mkdir: created directory '/var/lib/csf/ui'
mkdir: created directory '/var/lib/csf/stats'
mkdir: created directory '/var/lib/csf/lock'
mkdir: created directory '/var/lib/csf/webmin'
mkdir: created directory '/var/lib/csf/zone'
mkdir: created directory '/usr/local/csf/bin'
mkdir: created directory '/usr/local/csf/lib'
mkdir: created directory '/usr/local/csf/tpl'
'csf.generic.conf' -> '/etc/csf/csf.conf'
'csf.allow' -> '/etc/csf/./csf.allow'
'csf.deny' -> '/etc/csf/./csf.deny'
'csf.redirect' -> '/etc/csf/./csf.redirect'
'csf.resellers' -> '/etc/csf/./csf.resellers'
'csf.dirwatch' -> '/etc/csf/./csf.dirwatch'
'csf.logfiles' -> '/etc/csf/./csf.logfiles'
'csf.logignore' -> '/etc/csf/./csf.logignore'
'csf.blocklists' -> '/etc/csf/./csf.blocklists'
'csf.ignore' -> '/etc/csf/./csf.ignore'
'csf.generic.pignore' -> '/etc/csf/csf.pignore'
'csf.rignore' -> '/etc/csf/./csf.rignore'
'csf.fignore' -> '/etc/csf/./csf.fignore'
'csf.signore' -> '/etc/csf/./csf.signore'
'csf.suignore' -> '/etc/csf/./csf.suignore'
'csf.uidignore' -> '/etc/csf/./csf.uidignore'
'csf.mignore' -> '/etc/csf/./csf.mignore'
'csf.sips' -> '/etc/csf/./csf.sips'
'csf.dyndns' -> '/etc/csf/./csf.dyndns'
'alert.txt' -> '/usr/local/csf/tpl/./alert.txt'
'reselleralert.txt' -> '/usr/local/csf/tpl/./reselleralert.txt'
'logalert.txt' -> '/usr/local/csf/tpl/./logalert.txt'
'logfloodalert.txt' -> '/usr/local/csf/tpl/./logfloodalert.txt'
'syslogalert.txt' -> '/usr/local/csf/tpl/./syslogalert.txt'
'integrityalert.txt' -> '/usr/local/csf/tpl/./integrityalert.txt'
'exploitalert.txt' -> '/usr/local/csf/tpl/./exploitalert.txt'
'queuealert.txt' -> '/usr/local/csf/tpl/./queuealert.txt'
'tracking.txt' -> '/usr/local/csf/tpl/./tracking.txt'
'connectiontracking.txt' -> '/usr/local/csf/tpl/./connectiontracking.txt'
'processtracking.txt' -> '/usr/local/csf/tpl/./processtracking.txt'
'accounttracking.txt' -> '/usr/local/csf/tpl/./accounttracking.txt'
'usertracking.txt' -> '/usr/local/csf/tpl/./usertracking.txt'
'sshalert.txt' -> '/usr/local/csf/tpl/./sshalert.txt'
'webminalert.txt' -> '/usr/local/csf/tpl/./webminalert.txt'
'sualert.txt' -> '/usr/local/csf/tpl/./sualert.txt'
'consolealert.txt' -> '/usr/local/csf/tpl/./consolealert.txt'
'uialert.txt' -> '/usr/local/csf/tpl/./uialert.txt'
'cpanelalert.txt' -> '/usr/local/csf/tpl/./cpanelalert.txt'
'scriptalert.txt' -> '/usr/local/csf/tpl/./scriptalert.txt'
'relayalert.txt' -> '/usr/local/csf/tpl/./relayalert.txt'
'filealert.txt' -> '/usr/local/csf/tpl/./filealert.txt'
'watchalert.txt' -> '/usr/local/csf/tpl/./watchalert.txt'
'loadalert.txt' -> '/usr/local/csf/tpl/./loadalert.txt'
'resalert.txt' -> '/usr/local/csf/tpl/./resalert.txt'
'portscan.txt' -> '/usr/local/csf/tpl/./portscan.txt'
'uidscan.txt' -> '/usr/local/csf/tpl/./uidscan.txt'
'permblock.txt' -> '/usr/local/csf/tpl/./permblock.txt'
'netblock.txt' -> '/usr/local/csf/tpl/./netblock.txt'
'portknocking.txt' -> '/usr/local/csf/tpl/./portknocking.txt'
'forkbombalert.txt' -> '/usr/local/csf/tpl/./forkbombalert.txt'
'x-arf.txt' -> '/usr/local/csf/tpl/./x-arf.txt'
'regex.custom.pm' -> '/usr/local/csf/bin/./regex.custom.pm'
'pt_deleted_action.pl' -> '/usr/local/csf/bin/./pt_deleted_action.pl'
'messenger' -> '/etc/csf/./messenger'
'messenger/index.text' -> '/etc/csf/./messenger/index.text'
'messenger/index.html' -> '/etc/csf/./messenger/index.html'
'messenger/csf_small.png' -> '/etc/csf/./messenger/csf_small.png'
'ui' -> '/etc/csf/./ui'
'ui/ui.allow' -> '/etc/csf/./ui/ui.allow'
'ui/server.key' -> '/etc/csf/./ui/server.key'
'ui/server.crt' -> '/etc/csf/./ui/server.crt'
'ui/ui.ban' -> '/etc/csf/./ui/ui.ban'
'ui/images' -> '/etc/csf/./ui/images'
'ui/images/LICENSE.txt' -> '/etc/csf/./ui/images/LICENSE.txt'
'ui/images/cxs_small.png' -> '/etc/csf/./ui/images/cxs_small.png'
'ui/images/cxs-loader.gif' -> '/etc/csf/./ui/images/cxs-loader.gif'
'ui/images/perm.png' -> '/etc/csf/./ui/images/perm.png'
'ui/images/plus.png' -> '/etc/csf/./ui/images/plus.png'
'ui/images/delete.png' -> '/etc/csf/./ui/images/delete.png'
'ui/images/viewdelivery.png' -> '/etc/csf/./ui/images/viewdelivery.png'
'ui/images/deliver.png' -> '/etc/csf/./ui/images/deliver.png'
'ui/images/cxs.png' -> '/etc/csf/./ui/images/cxs.png'
'ui/images/ip.png' -> '/etc/csf/./ui/images/ip.png'
'ui/images/icon.gif' -> '/etc/csf/./ui/images/icon.gif'
'ui/images/cse_small.png' -> '/etc/csf/./ui/images/cse_small.png'
'ui/images/minus.png' -> '/etc/csf/./ui/images/minus.png'
'ui/images/csf_small.png' -> '/etc/csf/./ui/images/csf_small.png'
'lfd.logrotate' -> '/etc/logrotate.d/lfd'
'csfcron.sh' -> '/etc/cron.d/csfcron.sh'
'csf.pl' -> '/usr/sbin/csf'
'lfd.pl' -> '/usr/sbin/lfd'
'/etc/csf/csf.pl' -> '/usr/sbin/csf'
'/etc/csf/lfd.pl' -> '/usr/sbin/lfd'
'/etc/csf/csfui.pl' -> '/usr/local/csf/bin/csfui.pl'
'/etc/csf/csftest.pl' -> '/usr/local/csf/bin/csftest.pl'
'/etc/csf/pt_deleted_action.pl' -> '/usr/local/csf/bin/pt_deleted_action.pl'
'/etc/csf/remove_apf_bfd.sh' -> '/usr/local/csf/bin/remove_apf_bfd.sh'
'/etc/csf/uninstall.sh' -> '/usr/local/csf/bin/uninstall.sh'
'/etc/csf/regex.custom.pm' -> '/usr/local/csf/bin/regex.custom.pm'
'/etc/csf/webmin' -> '/usr/local/csf/lib/webmin'
'/etc/csf/alerts' -> '/usr/local/csf/tpl'
'uninstall.generic.sh' -> '/usr/local/csf/bin/uninstall.sh'
'csfui.pl' -> '/usr/local/csf/bin/csfui.pl'
'csfuir.pl' -> '/usr/local/csf/bin/csfuir.pl'
'cseui.pl' -> '/usr/local/csf/bin/cseui.pl'
'csftest.pl' -> '/usr/local/csf/bin/csftest.pl'
'regex.pm' -> '/usr/local/csf/bin/regex.pm'
'servercheck.pm' -> '/usr/local/csf/bin/servercheck.pm'
'remove_apf_bfd.sh' -> '/usr/local/csf/bin/remove_apf_bfd.sh'
'readme.txt' -> '/etc/csf/readme.txt'
'sanity.txt' -> '/usr/local/csf/lib/sanity.txt'
'restricted.txt' -> '/usr/local/csf/lib/restricted.txt'
'changelog.txt' -> '/etc/csf/changelog.txt'
'install.txt' -> '/etc/csf/install.txt'
'version.txt' -> '/etc/csf/version.txt'
'license.txt' -> '/etc/csf/license.txt'
'lfd.sh' -> '/etc/init.d/lfd'
'csf.sh' -> '/etc/init.d/csf'
'webmin' -> '/usr/local/csf/lib/webmin'
'webmin/csf' -> '/usr/local/csf/lib/webmin/csf'
'webmin/csf/index.cgi' -> '/usr/local/csf/lib/webmin/csf/index.cgi'
'webmin/csf/module.info' -> '/usr/local/csf/lib/webmin/csf/module.info'
'webmin/csf/images' -> '/usr/local/csf/lib/webmin/csf/images'
'webmin/csf/images/LICENSE.txt' -> '/usr/local/csf/lib/webmin/csf/images/LICENSE.txt'
'webmin/csf/images/perm.png' -> '/usr/local/csf/lib/webmin/csf/images/perm.png'
'webmin/csf/images/plus.png' -> '/usr/local/csf/lib/webmin/csf/images/plus.png'
'webmin/csf/images/delete.png' -> '/usr/local/csf/lib/webmin/csf/images/delete.png'
'webmin/csf/images/ip.png' -> '/usr/local/csf/lib/webmin/csf/images/ip.png'
'webmin/csf/images/icon.gif' -> '/usr/local/csf/lib/webmin/csf/images/icon.gif'
'webmin/csf/images/minus.png' -> '/usr/local/csf/lib/webmin/csf/images/minus.png'
'webmin/csf/images/csf_small.png' -> '/usr/local/csf/lib/webmin/csf/images/csf_small.png'
'Net' -> '/usr/local/csf/lib/Net'
'Net/CIDR' -> '/usr/local/csf/lib/Net/CIDR'
'Net/CIDR/Lite.pm' -> '/usr/local/csf/lib/Net/CIDR/Lite.pm'
'Geo' -> '/usr/local/csf/lib/Geo'
'Geo/IP.pm' -> '/usr/local/csf/lib/Geo/IP.pm'
'Geo/IP' -> '/usr/local/csf/lib/Geo/IP'
'Geo/IP/Record.pm' -> '/usr/local/csf/lib/Geo/IP/Record.pm'
'Geo/IP/Record.pod' -> '/usr/local/csf/lib/Geo/IP/Record.pod'
'Geo/Mirror.pm' -> '/usr/local/csf/lib/Geo/Mirror.pm'
'Crypt' -> '/usr/local/csf/lib/Crypt'
'Crypt/CBC.pm' -> '/usr/local/csf/lib/Crypt/CBC.pm'
'Crypt/Blowfish_PP.pm' -> '/usr/local/csf/lib/Crypt/Blowfish_PP.pm'
'HTTP' -> '/usr/local/csf/lib/HTTP'
'HTTP/Tiny.pm' -> '/usr/local/csf/lib/HTTP/Tiny.pm'
'csf.div' -> '/usr/local/csf/lib/csf.div'
'ui/images/LICENSE.txt' -> '/etc/csf/ui/./images/LICENSE.txt'
'ui/images/cxs_small.png' -> '/etc/csf/ui/./images/cxs_small.png'
'ui/images/cxs-loader.gif' -> '/etc/csf/ui/./images/cxs-loader.gif'
'ui/images/perm.png' -> '/etc/csf/ui/./images/perm.png'
'ui/images/plus.png' -> '/etc/csf/ui/./images/plus.png'
'ui/images/delete.png' -> '/etc/csf/ui/./images/delete.png'
'ui/images/viewdelivery.png' -> '/etc/csf/ui/./images/viewdelivery.png'
'ui/images/deliver.png' -> '/etc/csf/ui/./images/deliver.png'
'ui/images/cxs.png' -> '/etc/csf/ui/./images/cxs.png'
'ui/images/ip.png' -> '/etc/csf/ui/./images/ip.png'
'ui/images/icon.gif' -> '/etc/csf/ui/./images/icon.gif'
'ui/images/cse_small.png' -> '/etc/csf/ui/./images/cse_small.png'
'ui/images/minus.png' -> '/etc/csf/ui/./images/minus.png'
'ui/images/csf_small.png' -> '/etc/csf/ui/./images/csf_small.png'
'lfdcron.sh' -> '/etc/cron.d/lfdcron.sh'
'csf.1.txt' -> '/usr/local/man/man1/csf.1'
'csf.help' -> '/usr/local/csf/lib/csf.help'
mode of '/usr/local/csf/bin/cseui.pl' changed from 0600 (rw-------) to 0700 (rwx------)
mode of '/usr/local/csf/bin/csftest.pl' changed from 0600 (rw-------) to 0700 (rwx------)
mode of '/usr/local/csf/bin/csfui.pl' changed from 0600 (rw-------) to 0700 (rwx------)
mode of '/usr/local/csf/bin/csfuir.pl' changed from 0600 (rw-------) to 0700 (rwx------)
mode of '/usr/local/csf/bin/pt_deleted_action.pl' changed from 0600 (rw-------) to 0700 (rwx------)
mode of '/usr/local/csf/bin/remove_apf_bfd.sh' changed from 0600 (rw-------) to 0700 (rwx------)
mode of '/usr/local/csf/bin/uninstall.sh' changed from 0600 (rw-------) to 0700 (rwx------)
mode of '/usr/local/csf/bin/regex.custom.pm' changed from 0600 (rw-------) to 0700 (rwx------)
mode of '/usr/local/csf/bin/regex.pm' changed from 0600 (rw-------) to 0700 (rwx------)
mode of '/usr/local/csf/bin/servercheck.pm' changed from 0600 (rw-------) to 0700 (rwx------)
mode of '/etc/csf/webmin/csf/index.cgi' changed from 0600 (rw-------) to 0700 (rwx------)
mode of '/etc/init.d/lfd' retained as 0755 (rwxr-xr-x)
mode of '/etc/init.d/csf' retained as 0755 (rwxr-xr-x)
mode of '/etc/cron.d/lfdcron.sh' changed from 0755 (rwxr-xr-x) to 0644 (rw-r--r--)
mode of '/etc/cron.d/csfcron.sh' changed from 0755 (rwxr-xr-x) to 0644 (rw-r--r--)
mode of 'auto.generic.pl' changed from 0755 (rwxr-xr-x) to 0700 (rwx------)

*** FASTSTART Enabled


*** IPV6 Enabled


TCP ports currently listening for incoming connections:
22,80,3306

UDP ports currently listening for incoming connections:
1194

Note: The port details above are for information only, csf hasn't been auto-configured.

Don't forget to:
1. Configure the following options in the csf configuration to suite your server: TCP_*, UDP_*
2. Restart csf and lfd
3. Set TESTING to 0 once you're happy with the firewall, lfd will not run until you do so

Adding current SSH session IP address to the csf whitelist in csf.allow:
Error: /sbin/ifconfig (ifconfig binary location) -v does not exist!, at line 2161
* service lfd added to runlevel default
* service csf added to runlevel default
'/etc/csf/csfwebmin.tgz' -> '/usr/local/csf/csfwebmin.tgz'

Installation Completed

# ifconfig -v
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 199.xxx.xxx.xxx netmask 255.255.255.0 broadcast 199.xxx.xxx.255
inet6 fe80::216:3cff:fe7d:c4b5 prefixlen 64 scopeid 0x20<link>
ether 00:xx:xx:xx:xx:xx txqueuelen 1000 (Ethernet)
RX packets 28909724 bytes 3734280889 (3.4 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 52084587 bytes 75556823103 (70.3 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 2 bytes 1152 (1.1 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2 bytes 1152 (1.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
szarka
Junior Member
Posts: 4
Joined: 27 Jul 2013, 15:41

Re: CSF and gentoo

Post by szarka »

I don't have a gentoo install handy, but I think you probably want to try /bin/ifconfig instead of /sbin/ifconfig
Post Reply