1. Current Location: Home >  NAS >  OECT flashes flying bull, and after installing openwrt with docker, it cannot enter openwrt

OECT flashes flying bull, and after installing openwrt with docker, it cannot enter openwrt

OECT After brushing Feiniu, the OpenWrt running in Docker can't get into the background, 90% of it is "macvlan completely separates the host from the container" - that is, you can ping OpenWrt from your phone or computer, but Feiniu itself can't open 192.168.x.x, so you think it's "not started", but it's actually fine, but you didn't set up a "springboard" for it.

OECT flashes flying bull, and after installing openwrt with docker, it cannot enter openwrt

follow the steps of human words below, and take your seats one by one.

1. Make sure the container is really running

SSH Enter the flying bull and knock on:
docker ps -a | grep openwrt
see that the STATUS is Up x minutes and continue; If it is a Exited, first docker the logs openwrt to see the error, there is a high probability that it is an IP conflict or no -privileged.

2. Turn on "mixed mode" for the physical network card

the name of the network card of Feiniu OS is strange, don't copy the eth0 of other people's tutorials.
first ip a find the one with -ovs, for example, mine is enp2s0-ovs, and then:
ip link set enp2s0-ovs promisc on
restart will be invalid, if you want to boot automatically:
Feiniu Panel → Control Panel → Scheduled Task → Boot Script, stuff the above one in, and save

3. Build a MacVLAN network (don't copy the IP address, replace it with your own network segment)

my main route is 192.168.31.1, so :
# Delete the previous random construction first docker network rm openwrt-lan 2>/dev/null # Rebuild a new one docker network create -d macvlan \ --subnet=192.168.31.0/24 --gateway=192.168.31.1 \ -o parent=enp2s0-ovs openwrt-lan

4. Pull the image + run the container

docker run -d --restart always --name openwrt \ --network openwrt-lan \ --privileged \ sulinggg/openwrt:x86_64 /sbin/init
use sulinggg for mirroring, don't use the old version.

5. Changing OpenWrt's own LAN IP

in the container:
docker exec -it openwrt bash vi /etc/config/network
find the config interface 'lan' and change option ipaddr to a address in your home network segment that no one uses, for example, I changed it to 192.168.31.2.
restart the network after modification:
/etc/init.d/network restart

6. The most critical step - to build a "springboard" for the flying bull itself

macvlan default does not allow hosts and containers to communicate , so if you enter 192.168.31.2 in the Flying Bull browser, it will time out, not because OpenWrt is hung, but because the packet is isolated.
solution: Virtualize a small interface on the Feiniu host as an "insider":
# Whatever the name is, just me_to_op is fine ip link add me_to_op link enp2s0-ovs type macvlan mode bridge ip addr add 192.168.31.5/24 dev me_to_op ip link set me_to_op up # Let traffic accessing 192.168.31.2 go through this interface ip route add 192.168.31.2 dev me_to_op
after execution, immediately go to Feiniu Browser and type 192.168.31.2, and the familiar LuCI login interface will pop up

7. Want to make the "springboard" automatically have?

throw the above 4 commands /etc/rc.local (create a new one if you don't have one), or add another "boot script" to the task of the flying bull plan, and you're done.

8. Or can't get in?

  • computer and mobile phone can ping 192.168.31.2, but Feiniu can't → 100% didn't take the springboard, go back to step 6.
  • all pings → the container didn't start, go back to step 1 to read the logs.
  • can open the page, but the dialing fails→ the WAN/LAN ports in the container are reversed, and the two NIC cards of -o parent are swapped and rebuilt the network.

summarizes in one sentence:
container has actually been started a long time ago, that is, Macvlan has blocked the flying bull body from the door; Add a small interface to the host machine as an "insider", and you can immediately enter the background.
Read More


Copyright Notice Scan to read on mobile
All Rights Reserved: 《SHUNOT》 => 《OECT flashes flying bull, and after installing openwrt with docker, it cannot enter openwrt
Article URL: https://www.shunot.com/en/nas/696.html
Unless otherwise stated, all articles are original by 《SHUNOT》. Reposting is welcome! Please indicate the original URL when reposting, thank you.

Comment List

Boiling wine and ...
Boiling wine and ...Reply
#17
After brushing Feiniu, I installed OpenWrt with Docker, but I couldn't get into the background, which was really a big headache. It can be pinged but cannot be accessed, it may be a network configuration problem, especially the macVLAN settings, which must be carefully investigated.
2 个月前
The cape is far away
The cape is far awayReply
#16
After brushing Feiniu and installing OpenWrt, the container running with docker is obviously normal, but it can't enter the background, which is really a headache. The prompt says that macvlan is separated, but I don't know how to solve it, please ask the gods to help!
3 个月前
Idle clouds and w...
Idle clouds and w...Reply
#15
After brushing Feiniu, I used Docker to install OpenWrt, but I could ping but couldn't get into the background, and most of the problems were in macVLAN isolation, which needed to be correctly configured in the mixed mode of physical network cards to solve it.
3 个月前
Xiao Ming
Xiao MingReply
#14
The key is that macvlan isolates the network, so you have to confirm the container status before adjusting the network card mode.
3 个月前
The world is not ...
The world is not ...Reply
#13
After brushing Feiniu, I used Docker to install OpenWrt, and it was obviously pinged but couldn't get into the background, which was really a big headache. It may be a problem with MacVLAN settings, it is recommended to follow the tutorial step by step to troubleshoot.
3 个月前
Red Dust Inn
Red Dust InnReply
#12
After brushing Feiniu, the OpenWrt card is inaccessible, and the key problem is macvlan isolation, which is really the details that determine success or failure, and it is not easy to bypass these pitfalls.
3 个月前
The sea of learni...
The sea of learni...Reply
#11
After brushing Feiniu, I installed OpenWrt with Docker, but I couldn't connect to the background, which was a real headache. It turns out that because MacVLAN isolates the network, you have to confirm the container status first, and then adjust the network card mode to open up the last mile.
3 个月前
One page book
One page bookReply
#10
It's really devastating that I can't access OpenWrt after installing it. Obviously you can ping, but you can't enter the background, it feels like you are separated from the door, and it took a long time to find out that it was a macvlan problem, which is really a pitfall!
3 个月前
Xiao Ai
Xiao AiReply
#9
After brushing the flying bull, I used docker to install openwrt, but I couldn't get into the background, which was really a big head. It turned out that it was because MacVLAN isolated the network, and I had to find a springboard to connect, but this was not mentioned in the tutorial, and I stepped on the pit.
3 个月前
Dawn
DawnReply
#8
After brushing Feiniu, I installed OpenWrt with Docker and found that I could not access the background.
3 个月前
The old scene of ...
The old scene of ...Reply
#7
After brushing the flying bull, I used Docker to install OpenWrt, what a pit! I can ping but can't get into the background, the problem is in macvlan isolation, and I have to have a springboard to connect, which is really crazy.
3 个月前
Pear blossoms wit...
Pear blossoms wit...Reply
#6
After brushing Feiniu, Docker OpenWrt cannot be accessed, and most of the problems are in macVLAN isolation.
4 个月前
Red dust infatuation
Red dust infatuationReply
#5
After brushing Feiniu and installing OpenWrt, I encountered an inaccessible problem, and the investigation found that macVLAN caused network isolation, which is really a headache!
4 个月前
The red dust is s...
The red dust is s...Reply
#4
After flashing Feiniu, I used Docker to install OpenWrt and was stuck in inaccessibility, and the problem was mostly in macvlan isolation, and I had to find a springboard to enter the background, which was really a pit.
4 个月前
The world is not ...
The world is not ...Reply
#3
After brushing Feiniu, I used Docker to install OpenWrt, and it was obviously possible to ping but couldn't get into the background, which was really a headache. Maybe it's because MacVLAN isolates the network, and you have to find a springboard to access it.
4 个月前

Contact Us

Online Consultation: Click here to send me a message

WeChat ID: master_135

Scan to follow