[root@dev tgadmin]# /etc/rc.d/init.d/c-icap startStarting c-icap (via systemctl): Job for c-icap.service failed because the control process exited with error code. See "systemctl status c-icap.service" and "journalctl -xe" for details. [FAILED][root@dev tgadmin]# systemctl status c-icap.service● c-icap.service - SYSV: c-icap is an implementation of an ICAP server. Loaded: loaded (/etc/rc.d/init.d/c-icap; bad; vendor preset: disabled) Active: failed (Result: exit-code) since Mon 2017-03-06 09:54:59 EST; 8s ago Docs: man:systemd-sysv-generator(8) Process: 18897 ExecStart=/etc/rc.d/init.d/c-icap start (code=exited, status=203/EXEC)Mar 06 09:54:59 dev.tg.local systemd[1]: Starting SYSV: c-icap is an implementation of an ICAP server....Mar 06 09:54:59 dev.tg.local systemd[1]: c-icap.service: control process exited, code=exited status=203Mar 06 09:54:59 dev.tg.local systemd[1]: Failed to start SYSV: c-icap is an implementation of an ICAP server..Mar 06 09:54:59 dev.tg.local systemd[1]: Unit c-icap.service entered failed state.Mar 06 09:54:59 dev.tg.local systemd[1]: c-icap.service failed.
2017/03/07 11:57:04 kid1| suspending ICAP service for too many failures2017/03/07 11:56:14 kid1| essential ICAP service is down after an options fetch failure: cap://192.168.1.226:1344/squidclamav [down,!valid]2017/03/07 11:56:14 kid1| WARNING: Squid got an invalid ICAP OPTIONS response from service cap://192.168.1.226:1344/squidclamav; error: unsupported status code of OPTIONS response
[root@dev log]# systemctl status c-icap● c-icap.service - c-icap service Loaded: loaded (/usr/lib/systemd/system/c-icap.service; enabled; vendor preset: disabled) Active: active (running) since Tue 2017-03-07 12:17:14 EST; 4min 20s ago Process: 22796 ExecStart=/usr/local/bin/c-icap -f /etc/c-icap.conf (code=exited, status=0/SUCCESS) Main PID: 22797 (c-icap) CGroup: /system.slice/c-icap.service ├─22797 /usr/local/bin/c-icap -f /etc/c-icap.conf ├─22798 /usr/local/bin/c-icap -f /etc/c-icap.conf ├─22799 /usr/local/bin/c-icap -f /etc/c-icap.conf └─22800 /usr/local/bin/c-icap -f /etc/c-icap.confMar 07 12:17:14 dev.tg.local systemd[1]: Starting c-icap service...Mar 07 12:17:14 dev.tg.local systemd[1]: Started c-icap service.[root@dev log]# systemctl status clamd@scan● clamd@scan.service - Generic clamav scanner daemon Loaded: loaded (/usr/lib/systemd/system/clamd@scan.service; enabled; vendor preset: disabled) Active: active (running) since Fri 2017-03-03 23:58:39 EST; 3 days ago Main PID: 9736 (clamd) CGroup: /system.slice/system-clamd.slice/clamd@scan.service └─9736 /usr/sbin/clamd -c /etc/clamd.d/scan.conf --foreground=yesMar 07 12:18:01 dev.tg.local clamd[9736]: SelfCheck: Database status OK.Mar 07 12:18:01 dev.tg.local clamd[9736]: SelfCheck: Database status OK.[root@dev log]#
[root@dev log]# netstat -talActive Internet connections (servers and established)Proto Recv-Q Send-Q Local Address Foreign Address Statetcp 0 0 0.0.0.0:icap 0.0.0.0:* LISTEN
[root@dev log]# ifconfigens160: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.226 netmask 255.255.255.0 broadcast 192.168.1.255
[root@dev tgadmin]# c-icap-client -s squidclamav -f eicar.comError connecting to host '::a00:0:540:0%22032468': Invalid argumentFailed to connect to icap server.....
Code: [Select][root@dev tgadmin]# c-icap-client -s squidclamav -f eicar.comError connecting to host '::a00:0:540:0%22032468': Invalid argumentFailed to connect to icap server.....
[root@dev tgadmin]# c-icap-client -s squidclamav -f eicar.com -i 127.0.0.1ICAP server:127.0.0.1, ip:127.0.0.1, port:1344
[root@dev tgadmin]# c-icap-client -i 127.0.0.1ICAP server:127.0.0.1, ip:127.0.0.1, port:1344OPTIONS: Allow 204: Yes Preview: 1024 Keep alive: YesICAP HEADERS: ICAP/1.0 200 OK Methods: RESPMOD, REQMOD Service: C-ICAP/0.4.2 server - Echo demo service ISTag: CI0001-XXXXXXXXX Transfer-Preview: * Options-TTL: 3600 Date: Tue, 07 Mar 2017 21:16:43 GMT Preview: 1024 Allow: 204 X-Include: X-Authenticated-User, X-Authenticated-Groups Encapsulated: null-body=0
Once the proxy is working, if you want to block anyone not using the proxy, then add a new firewall rule below the one you created earlier. This rule should be Deny traffic, Source: Interface net, Destination Address: ANY, Dst Port: 80. ...