1

I'm connecting to a VPN (Linux machine) through ssh and invoke the following command there:

sibi::bash-> python -m SimpleHTTPServer
Serving HTTP on 0.0.0.0 port 8000 ...

Then, I visit it in it's URL: http://x.x.x.x:8000 and the browser complains me that it is not able to connect.

How to debug this issue ?

( Apache's test page works fine in http://x.x.x.x )

Updated: IP Rules (iptables -L -n)

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED 
ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22 
REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination   
7
  • 1
    You are connecting to port 8080 but the server is shown as listening to port 8000... Note the difference, count the number of 8 and 0 digits in that. Commented Nov 19, 2013 at 12:16
  • @MartijnPieters Sorry, updated the question. Commented Nov 19, 2013 at 12:16
  • 2
    Does your VPN machine have a firewall? Most likely port 8000 is blocked (as would most ports be). Commented Nov 19, 2013 at 12:17
  • @MartijnPieters I don't think so, that's the problem. Have updated the IP rules. Commented Nov 19, 2013 at 12:29
  • And telnet localhost 8000 on the VPN, after starting the server, works? Commented Nov 19, 2013 at 12:30

1 Answer 1

2

It was clearly an firewall issue.

Flushing the iptables helped in resolving the issue:

sudo iptables -F

But be careful, you may want to set up proper firewall rules for your VPN server.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.