EvilFreelancer / docker-routeros

Mikrotik RouterOS inside Docker container
https://hub.docker.com/r/evilfreelancer/docker-routeros/
MIT License
369 stars 132 forks source link

Connection problem #4

Closed dmytroshokha closed 4 years ago

dmytroshokha commented 4 years ago

Hi, i made docker run -d -p 2222:22 -p 8728:8728 -p 8729:8729 -p 5900:5900 -ti ros and can connect via ssh to localhost but i can not connect by winbox.

EvilFreelancer commented 4 years ago

Hello! For enabling winbox you need first to go to ROS via ssh of via web and turn on winbox service via ROS system settings.

EvilFreelancer commented 4 years ago

/ip service enable winbox

dmytroshokha commented 4 years ago

Enabled winbox service 8291 192.168.88.1/32 but still can not connect via winbox. Should i firstly create new login\pass for connection?

EvilFreelancer commented 4 years ago

Of course, without it ssh and winbox won't work

dmytroshokha commented 4 years ago

Hmm, i changed default login\pass but still can not connect using winbox. May be could you write the steps, what should i do to connect via winbox after docker run?

EvilFreelancer commented 4 years ago

Btw, did you specified this port in settings of docker compose?

Small example from config which I use for work with container on my local machine:

version: "3"

services:

  routeros:
    image: evilfreelancer/docker-routeros:latest
    restart: unless-stopped
    ports:
      - "2222:22"
      - "2223:23"
      - "7777:80"
      - "8291:8291"
      - "8728:8728"
      - "8729:8729"
EvilFreelancer commented 4 years ago

And btw, in your command

docker run -d -p 2222:22 -p 8728:8728 -p 8729:8729 -p 5900:5900 -ti ros

i don't see the winbox port 8291

dmytroshokha commented 4 years ago

No, i'm not. That's my fault. Only run docker with ports like in example.

EvilFreelancer commented 4 years ago

I've not added this port to readme just in case, because people who not know docker in details may run it on production environment and be hacked, and how to open a port always can ask in google or from experienced people )) so, you've got solution? Issue may be closed, right?

EvilFreelancer commented 4 years ago

Hello! Repo was updated, i've added couple features, now possible to use internet from routeros in docker and map any port, please use at least evilfreelancer/docker-routeros:6.46.5

dmytroshokha commented 4 years ago

Hello! I immediately began to test as soon as i got to the pc. Now i can easily connect and use winbox. Thank you very much.

EvilFreelancer commented 4 years ago

Hello! I am glad that everything worked for you :)