Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have configured apache to Listen on the port 80 and 4986

I can access it on virtualhost on port 80 but can't access it on port 4986

I have tried lsof -i:4986 :

apache2 26669 www-data    6u  IPv6 46697578      0t0  TCP *:4986 (LISTEN)
apache2 26670 www-data    6u  IPv6 46697578      0t0  TCP *:4986 (LISTEN)
apache2 26739 www-data    6u  IPv6 46697578      0t0  TCP *:4986 (LISTEN)
apache2 26741 www-data    6u  IPv6 46697578      0t0  TCP *:4986 (LISTEN)
apache2 26742 www-data    6u  IPv6 46697578      0t0  TCP *:4986 (LISTEN)
apache2 26837 www-data    6u  IPv6 46697578      0t0  TCP *:4986 (LISTEN)
apache2 26939 www-data    6u  IPv6 46697578      0t0  TCP *:4986 (LISTEN)
apache2 26940 www-data    6u  IPv6 46697578      0t0  TCP *:4986 (LISTEN)
apache2 26941 www-data    6u  IPv6 46697578      0t0  TCP *:4986 (LISTEN)
apache2 26952 www-data    6u  IPv6 46697578      0t0  TCP *:4986 (LISTEN)

the port is listened

but when I'm trying nmap -v -A localhost

Scanning localhost (127.0.0.1) [1000 ports]
Discovered open port 110/tcp on 127.0.0.1
Discovered open port 143/tcp on 127.0.0.1
Discovered open port 993/tcp on 127.0.0.1
Discovered open port 53/tcp on 127.0.0.1
Discovered open port 80/tcp on 127.0.0.1
Discovered open port 995/tcp on 127.0.0.1
Discovered open port 25/tcp on 127.0.0.1
Discovered open port 22/tcp on 127.0.0.1
Discovered open port 1723/tcp on 127.0.0.1
Discovered open port 21/tcp on 127.0.0.1
Discovered open port 10000/tcp on 127.0.0.1
Discovered open port 9091/tcp on 127.0.0.1
Discovered open port 6502/tcp on 127.0.0.1
Discovered open port 6969/tcp on 127.0.0.1
Discovered open port 8333/tcp on 127.0.0.1

the port isn't discovered

I have also to add this on my iptables :

iptables -t filter -A INPUT -p tcp --dport 4986 -j ACCEPT
iptables -t filter -A INPUT -p udp --dport 4986 -j ACCEPT
iptables -t filter -A OUTPUT -p tcp --dport 4986 -j ACCEPT
iptables -t filter -A OUTPUT -p udp --dport 4986 -j ACCEPT

but not working

any idea of what is going wrong ?

share|improve this question

2 Answers 2

It appears Apache is listening on port 4986 on IPv6 only (unless you suppressed the output).

You also append IPTables rules to the existing ones so if there was a drop rule before that you wont be able to access it.

Regards

share|improve this answer

nmap only scans the most common ports by default; 4986 isn't one of them.

run nmap -p 4986 localhost and it should show the open port

share|improve this answer
    
I get that : 4986/tcp closed unknown how can I fix it ? –  Jeremy Talus Apr 11 '13 at 13:42
    
See the other answer too... –  Chris S Apr 11 '13 at 15:56
    
nothing on iptable will block this port –  Jeremy Talus Apr 12 '13 at 12:43
    
What is/are your listen lines in your httpd.conf file? –  Chris S Apr 12 '13 at 12:50
    
NameVirtualHost *:80 Listen 80 NameVirtualHost *:4986 Listen *:4986 –  Jeremy Talus Apr 12 '13 at 13:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.