Can’t open port for my docker container. I started docker by:
docker run -p 8079:8080 -p 50000:50000 -d jenkins
After this i added rule for ufw:
ufw status
Status: active
To Action From
-- ------ ----
8080 ALLOW Anywhere
22 ALLOW Anywhere
80 ALLOW Anywhere
8079 ALLOW Anywhere
8079/tcp ALLOW Anywhere
8080 (v6) ALLOW Anywhere (v6)
22 (v6) ALLOW Anywhere (v6)
80 (v6) ALLOW Anywhere (v6)
8079 (v6) ALLOW Anywhere (v6)
8079/tcp ALLOW OUT Anywhere
8079/tcp (v6) ALLOW OUT Anywhere (v6)
The result of nmap is:
nmap -sS -O 178.62.88.56
Starting Nmap 7.01 ( https://nmap.org ) at 2017-06-19 11:39 UTC
Nmap scan report for 178.62.88.56
Host is up (0.000035s latency).
Not shown: 998 closed ports
PORT STATE SERVICE
22/tcp open ssh
50000/tcp filtered ibm-db2
Device type: general purpose
Running: Linux 3.X
OS CPE: cpe:/o:linux:linux_kernel:3
OS details: Linux 3.8 - 3.19
Network Distance: 0 hops
OS detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 5.73 seconds
Also, I tried:
iptables -A INPUT -p tcp --dport 8079 -j ACCEPT
but with no success.
The netstat response is:
netstat -plutn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1514/sshd
tcp6 0 0 :::8079 :::* LISTEN 12802/docker-proxy
tcp6 0 0 :::50000 :::* LISTEN 12781/docker-proxy
tcp6 0 0 :::22 :::* LISTEN 1514/sshd
How can I fix this problem?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.