Docker container cannot connect to remote server

I have got a VPS with Centos 7.3. I have a container which requires to connect to redis in remote server to get some data for working on them. I have opened the port of redis for this server and I can see that port and connect to it using telnet. From inside of the container as well, I made telnet to that host and port and it worked. Unfortunately when I make it up it cannot connect to the remote server redis. I have tested this container on another host and it works! I appreciate your help!. Thanks.

Source: Docker Questions