Cannot open port 8080 even after configuring iptables

April 20, 2014 3k views
hi i am a newbie to linux . I want to open port 8080 so that my varnish cache can run on that port i have made the necessory changes in iptable and also restated iptables but my port still seems closed. your help would be really appreciated thanks in advance
2 Answers
Sorry if I'm asking something obvious, but does your varnish cache listen to your external address? If it is listening to localhost, it wont answer to any request coming from another address. You could use telnet to check if varnish is listening by executing this command
"telnet localhost 8080" and "telnet your-ip 8080"
If something is listening on one of those address, it should print something like:
Trying ::1...
Connected to localhost.
Escape character is '^]'
Then something is listening to this port, if it just says connection refused or timeout, it isnt listening to this port.
You could use nmap to determine if varnish is listening to another port.
"nmap localhost" or "nmap your-ip"
I hope this helps a little...
Have another answer? Share your knowledge.