Internet not working in container


I have created a container using docker run command with -p command. Container is running fine and port is accessible within container but the same port not accessible from another server.
getting below error :

Trying ...** …
telnet: connect to address ...** : Connection timed out

Even nslookup ,ping to other ips not working
If someone could help me out to resolve this issue, would be great help.

You might want to put this in other words. How are publishing a port with -p and “internet not working” related?