Vince Stewart
I have a VPS on Ubuntu 12 and a home computer on Ubuntu 12. I have a Java application on the VPS which opens a tcp socket listening on port 4000 and also an Http listener. My ssh service operates on port 55555. Once the application has been started I get a this report when I enter on the command line:
netstat -t -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:55555 *:* LISTEN
tcp6 0 0 [::]:http-alt [::]:* LISTEN
tcp6 0 0 [::]:55555 [::]:* LISTEN
tcp6 0 0 vps.mdomai.com:4000 [::]:* LISTEN
with denyhosts operating my /etc/hosts.allow is just one line
ALL: xxx.xxx.xxx.xxx
(xxx.xxx.xxx.xxx is my static home IP address)
/etc/hosts.deny is:
ALL:ALL
I can connect from home using:
telnet yyy.yyy.yyy.yyy 55555 or telnet yyy.yyy.yyy.yyy 8080
(yyy.yyy.yyy.yyy is for my VPS address)
but with:
telnet yyy.yyy.yyy.yyy 4000
an error is thrown ("Unable to connect to remote host: connection refused"). This seems like a firewall issue. I am pretty sure I have not changed iptables so should be VPS default. Many thanks for any suggestions. When I issue sudo ufw raw, I get:
IPV4 (raw):
Chain INPUT (policy ACCEPT 21043 packets, 2314421 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 21077 packets, 2152970 bytes)
pkts bytes target prot opt in out source destination
Chain PREROUTING (policy ACCEPT 318 packets, 41345 bytes)
pkts bytes target prot opt in out source destination
Chain INPUT (policy ACCEPT 42 packets, 7128 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 347 packets, 24571 bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 347 packets, 24571 bytes)
pkts bytes target prot opt in out source destination
Chain PREROUTING (policy ACCEPT 6241 packets, 691583 bytes)
pkts bytes target prot opt in out source destination
Chain INPUT (policy ACCEPT 5965 packets, 657366 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 5936 packets, 614188 bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 10872 packets, 1131008 bytes)
pkts bytes target prot opt in out source destination
Chain PREROUTING (policy ACCEPT 6241 packets, 691583 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 5936 packets, 614188 bytes)
pkts bytes target prot opt in out source destination
IPV6:
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination