LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Why is this process only listening on TCP6? (https://www.linuxquestions.org/questions/linux-software-2/why-is-this-process-only-listening-on-tcp6-4175486989/)

littlebigman 12-05-2013 08:47 AM

Why is this process only listening on TCP6?
 
Hello

I just installed the Privoxy web filter through apt-get on an ARM appliance, and noticed it's only listening on TCP6 instead of TCP (+ TCP6):

Code:

# netstat -tunlp | grep privoxy
tcp6      0      0 ::1:8118                :::*                    LISTEN      18276/privoxy

# grep listen-address /etc/privoxy/config
listen-address  localhost:8118

The startup script doesn't seem to include a setting that would explain this behavior:
Code:

/etc/init.d/privoxy
# Function that starts the daemon/service
#
do_start()
{
        # Return
        #  0 if daemon has been started
        #  1 if daemon was already running
        #  2 if daemon could not be started
        start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
                || return 1
        start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
                $DAEMON_ARGS \
                || return 2
        # Add code here, if necessary, that waits for the process to be ready
        # to handle requests from services started subsequently which depend
        # on this one.  As a last resort, sleep for some time.
}

Any idea what I could to do have it listen on TCP?

Thank you.

Ser Olmy 12-05-2013 09:19 PM

Have you tried specifying the IPv4 localhost address (127.0.0.1) in the config file instead of the name "localhost"?

Does the name "localhost" resolve to both 127.0.0.1 and ::1 on your system? (Check the /etc/hosts file; try both ping localhost and ping6 localhost).

littlebigman 12-07-2013 04:31 PM

Thanks Ser, editing /etc/hosts and restarting Privoxy solved the problem

Code:

...
# Commented those lines
#::1    localhost ip6-localhost ip6-loopback
#ff02::1 ip6-allnodes
#ff02::2 ip6-allrouters


Ser Olmy 12-07-2013 06:59 PM

Instead of comenting out those lines, adding
Code:

127.0.0.1    localhost
on a separate line would probably have done the trick as well.


All times are GMT -5. The time now is 11:51 PM.