EvilFreelancer / docker-routeros

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

no internert #2

Closed akbar9000 closed 4 years ago

akbar9000 commented 5 years ago

hi.. I installed and logged in ROS but no internet in router..where is problem

EvilFreelancer commented 5 years ago

Hello @akbar9000 !

You probably saw in readme of this project what this project is was created for test purpose only, in particular for testing API library and not optimized for real work.

But, one of GitHub members with nick name @reinethernal created issue #1 about additional ports from host machine to container interfaces, @reinethernal used network_mode: "host" option of docker-compose and created bridges on the host machine, then connected the necessary interfaces from container and host with these bridges.

@akbar9000 you probably can make something simmilar, in brodge mode with host interfaces you don't need to worry about routing, eveyrthing will work as normal nerwork device.

I hope my advice will help you :)

akbar9000 commented 5 years ago

OK thanks..if you have got internet inside ROUTEROS please tell how..I will try @reinethernal method

victorzzt commented 4 years ago

Hi, first thanks for the image, all winbox and all internal functions works very well. I got here because of the same problem.

I tried to solve it, but failed miserably, so want to ask you guys advice am I on the right track.

So right now I'm trying a not scalable way:


# basically make it unusable
ifconfig eth0 173.11.0.1 netmask 255.255.255.255

sleep 5

qemu-system-x86_64 \
    -vnc 0.0.0.0:0 \
    -m 256 \
    -hda $ROUTEROS_IMAGE \
    -device e1000,netdev=net0 \
    -netdev tap,id=net0

And then the container keeps restarting. basically what I'm thinking is that the container host doesn't really need the ip address, and ros can takerover the container's interface and use the ip with full access.

Right now getting

ifconfig: SIOCSIFADDR: Operation not permitted
qemu-system-x86_64: could not open /dev/net/tun: No such file or directory

And I always thought in the container has root access. I'm still new on this. Thanks in advance.

Edit: I runned with privilege now gives:

qemu-ifup failed with status 256

Edit: Now I followed instruction that properly creates br0 and let the qemu use tap network without error, however, there's no way for me to know what's going on inside the routeros itself : (

EvilFreelancer commented 4 years ago

Hello here! Small update, now possible to map any part of routeros to host machine, plus issue with "no internet" from routeros is also fixed, please use at least evilfreelancer/docker-routeros:6.46.5