1

I have to install apache2 in order to install sslh (A SSL/SSH Multiplexer for Linux) by following this guide http://www.unixmen.com/sslh-a-sslssh-multiplexer-for-linux/ but I get result following with $ sudo apt-get install apache2 :

    Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
apache2 est déjà la plus récente version disponible.
0 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.
1 partiellement installés ou enlevés.
Après cette opération, 0 o d'espace disque supplémentaires seront utilisés.
Souhaitez-vous continuer ? [O/n] O
Paramétrage de apache2 (2.4.10-10) ...        
insserv: warning: script 'unbound' missing LSB tags and overrides
        insserv: There is a loop between service cups-browsed and unbound if stopped
        insserv:  loop involving service unbound at depth 2
        insserv:  loop involving service cups-browsed at depth 1
        insserv:  loop involving service sendsigs at depth 4
        insserv: exiting now without changing boot order!
        update-rc.d: error: insserv rejected the script header
        dpkg: erreur de traitement du paquet apache2 (--configure) :
         le sous-processus script post-installation installé a retourné une erreur de sortie d'état 1
        Traitement des actions différées (« triggers ») pour systemd (215-17) ...
        Des erreurs ont été rencontrées pendant l'exécution :
         apache2
        needrestart is being skipped since dpkg has failed
        E: Sub-process /usr/bin/dpkg returned an error code (1)

An idea please because nothing seems work. SSLH works with ssh -p 443 user@machine from Debian 8 but doesn't work if i try with an other machine like Kubuntu 15.10 or Mac OS X for example. I use VirtualBox for my tests.

Weird message because sudo /etc/init.d/apache2 restart gives

[ ok ] Restarting apache2 (via systemctl): apache2.service.

Also I get an answer with lynx http://localhost from Debian side (guest OS) but not from Mac OS X (my host) with the same command.

Debian Logo Apache2 Debian Default Page
   It works!

   This is the default welcome page used to test the correct operation of
   the Apache2 server after installation on Debian systems. If you can
   read this page, it means that the Apache HTTP server installed at this
   site is working properly. You should replace this file (located at
   /var/www/html/index.html) before continuing to operate your HTTP
   server.

   If you are a normal user of this web site and don't know what this page
   is about, this probably means that the site is currently unavailable
   due to maintenance. If the problem persists, please contact the site's
   administrator.
   Configuration Overview

   Debian's Apache2 default configuration is different from the upstream
   default configuration, and split into several files optimized for
   interaction with Debian tools. The configuration system is fully
   documented in /usr/share/doc/apache2/README.Debian.gz. Refer to this

Perhaps a problem with missing LSB tags and/or update-rc.d: error: insserv rejected the script header

My apache2.conf : https://friendpaste.com/KEIIBZ8H1F1t3trdjEyT3

A more /etc/init.d/unbound gives :

#!/bin/sh
#
# unbound This shell script takes care of starting and stopping
# unbound (DNS server).

exec="/usr/local/sbin/unbound"
prog="unbound"
config="/var/unbound/unbound.conf"
pidfile="/var/run/unbound.pid"
rootdir="/var/unbound"

case "$1" in
start)
[ -x $exec ] || exit 5
[ -f $config ] || exit 6
echo -n $"Starting $prog: "

# setup root jail
if [ -s /etc/localtime ]; then
[ -d ${rootdir}/etc ] || mkdir -p ${rootdir}/etc ;
if [ ! -e ${rootdir}/etc/localtime ] || /usr/bin/cmp -s /etc/localtime ${rootdir
}/etc/localtime; then
cp -fp /etc/localtime ${rootdir}/etc/localtime
fi;
fi;
if [ -s /etc/resolv.conf ]; then
[ -d ${rootdir}/etc ] || mkdir -p ${rootdir}/etc ;
if [ ! -e ${rootdir}/etc/resolv.conf ] || /usr/bin/cmp -s /etc/resolv.conf ${roo
tdir}/etc/resolv.conf; then
cp -fp /etc/resolv.conf ${rootdir}/etc/resolv.conf
fi;
fi;
if ! egrep -q '^/[^[:space:]]+[[:space:]]+'${rootdir}'/dev/log' /proc/mounts; th
en
[ -d ${rootdir}/dev ] || mkdir -p ${rootdir}/dev ;
[ -e ${rootdir}/dev/log ] || touch ${rootdir}/dev/log
mount --bind -n /dev/log ${rootdir}/dev/log >/dev/null 2>&1;
fi;
if ! egrep -q '^/[^[:space:]]+[[:space:]]+'${rootdir}'/dev/random' /proc/mounts;
 then
[ -d ${rootdir}/dev ] || mkdir -p ${rootdir}/dev ;
[ -e ${rootdir}/dev/random ] || touch ${rootdir}/dev/random
mount --bind -n /dev/random ${rootdir}/dev/random >/dev/null 2>&1;
fi;

# if not running, start it up here
start-stop-daemon --start --quiet --pidfile $pidfile --exec $exec -- -c $config
echo
;;

stop)
echo -n $"Stopping $prog: "
start-stop-daemon --stop --quiet --oknodo --pidfile $pidfile
echo
if egrep -q '^/[^[:space:]]+[[:space:]]+'${rootdir}'/dev/log' /proc/mounts; then
umount ${rootdir}/dev/log >/dev/null 2>&1
fi;
if egrep -q '^/[^[:space:]]+[[:space:]]+'${rootdir}'/dev/random' /proc/mounts; t
hen
umount ${rootdir}/dev/random >/dev/null 2>&1
fi;
;;

restart)
start-stop-daemon --stop --quiet --oknodo --pidfile $pidfile
start-stop-daemon --start --quiet --pidfile $pidfile --exec $exec -- -c $config
;;

reload)
start-stop-daemon --stop --signal 1 --quiet --oknodo --pidfile $pidfile --exec $
exec
;;

force_reload)
start-stop-daemon --stop --signal 1 --quiet --oknodo --pidfile $pidfile --exec $
exec
;;

*)
echo $"Usage: $0 {start|stop|restart|reload|force-reload}"
exit 2
;;
esac

exit 0

How to add the LSB tags with the good info ? wiki.debian.org/LSBInitScripts

#! /bin/sh
### BEGIN INIT INFO
# Provides: unbound
# Required-Start: $network $local_fs
# Required-Stop: $network $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: unbound recursive Domain Name Server.
# Description:  unbound is a Domain Name Server (DNS)
#               that is used to resolve host names to IP addresses.
### END INIT INFO

Thanks in advance.

Valorisa

1 Answer 1

0

Issue fixed with the link (debian-whezzy-unbound-install) http://labs.hatenablog.com/entry/debian-whezzy-unbound-install

### BEGIN INIT INFO up to ### END INIT INFO was missing at the beginning of /etc/init.d/unbound. I added this part :

### BEGIN INIT INFO
# Provides: unbound
# Required-Start: $network $local_fs
# Required-Stop: $network $local_fs
# Default-Start:
# Default-Stop: 0 1 2 3 4 5 6
# Should-Start: $syslog
# Should-Stop: $syslog
# Short-Description: unbound recursive Domain Name Server.
# Description:  unbound is a Domain Name Server (DNS) 
#               that is used to resolve host names to IP addresses.
### END INIT INFO

Now with sudo apt-get install apache2, I get :

Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
apache2 est déjà la plus récente version disponible.
0 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.

This part is functional. Only sslh is up to now problematic and not fully operational (ssh -p 443 user@machine from OS X to Debian fails and ssh user@localhost -p 443 from Debian 8 (loopback) works).

1
  • Try using tcpdump to see whether packets from MacOs are coming in; then stop ssh server daemon (systemctl stop ssh), then start it manually with /usr/sbin/sshd -Dd. This will print to screen error messages, if the ssh request from MacOS ccomes in. Commented Jun 11, 2015 at 17:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .