I am trying to figure out how I can connect to a Redis client which should be blocking all Redis connections over TCP on port 6379. The ruby client I'm using, and telnet, can both connect and execute commands. The golang client I'm using can't, and I'm really confused as to why.
Here's my iptables definition:
root@server:~# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- localhost anywhere
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:http
DROP all -- anywhere anywhere
DROP tcp -- anywhere anywhere tcp dpt:6379
Chain FORWARD (policy ACCEPT)
target prot opt source destination
DOCKER all -- anywhere anywhere
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain DOCKER (1 references) target prot opt source destination
Heres sample output indicating that I can't connect/telnet from my other port host using Golang:
FATAL: 2015/08/06 21:05:13 redis.go:43: Failed to register hostname with Redis.
FATAL: 2015/08/06 21:05:13 redis.go:44: dial tcp 95.105.137.209:6379: i/o timeout
Heres sample output indicating that I can connect from redis-rb:
irb(main):003:0> host = "myserver.io"
=> "myserver.io"
irb(main):004:0> port = 6379
=> 6379
irb(main):005:0> require 'redis'
=> true
irb(main):006:0> r = Redis.new(host: host, port: port, password: pass)
=> #<Redis client v3.2.1 for redis://myserver.io:6379/0>
irb(main):007:0> r.get('wat')
=> "yaaaa32"
Both client examples are from the same host. Can anyone point me in the right direction?