├── README.md └── openwrt-x86-64-generic-rootfs.tar.gz /README.md: -------------------------------------------------------------------------------- 1 | # Running OpenWrt on X86 2 | 3 | This is a OpenWrt image running on X86 Linux Docker,we did the demo using ubuntu. 4 | 5 | If you are on `ubuntu system`, please follow the instructions below to install the wireguard service on the host.Other types of servers require you to query related commands yourself. 6 | 7 | ``` 8 | $ sudo add-apt-repository ppa:wireguard/wireguard 9 | $ sudo apt-get update 10 | $ sudo apt-get install wireguard docker.io 11 | 12 | ``` 13 | Get the image, and move to directory /opt 14 | 15 | ``` 16 | $ git clone https://github.com/gl-inet/X86-OpenWrt.git 17 | $ cd X86-OpenWrt 18 | $ mv openwrt-x86-64-generic-rootfs.tar.gz /opt 19 | 20 | ``` 21 | 22 | Then you can import this image. For example, we name this machine `s2s` 23 | 24 | ``` 25 | docker import /opt/openwrt-x86-64-generic-rootfs.tar.gz s2s 26 | ``` 27 | 28 | open the port 51830 on x86 Linux(For example, Alibaba Cloud, you need to enter the server instance list, find the instance you want to add a port, and click more on the back to enter the security group configuration option to configure the port.) 29 | To start the OpenWrt system and bridge it to your Linux Host, using the following. 30 | `12345` is the port on Linux Host and `22` is the port of OpenWrt ssh port. 31 | 32 | ``` 33 | docker run -d -p 51830:51830/udp -p 12345:22 --privileged --name s2s s2s /sbin/init 34 | ``` 35 | 36 | To disconnect network 37 | 38 | ``` 39 | docker network disconnect bridge s2s 40 | ``` 41 | 42 | To start the network 43 | ``` 44 | docker network connect bridge s2s 45 | ``` 46 | 47 | Now you can ssh to the OpenWrt system on Linux Host by access the port `12345` 48 | ``` 49 | ssh -p 12345 root@127.0.0.1 50 | ``` 51 | 52 | Modify the configuration of /etc/config/glconfig (create the glconfig file if not, note that cloud selection should be based on actual needs) 53 | 54 | gslb-cn.goodcloud.xyz/gslb.gl-inet.cn;There are two options for Chinese users with the chinese server, and "gslb.gl-inet.cn" is recommended. 55 | 56 | gslb-jp.goodcloud.xyz;It's for Global user with Japan server. 57 | 58 | gslb-eu.goodcloud.xyz;It's for Europe user with Europe server. 59 | 60 | gslb-us.goodcloud.xyz;It's for America user with America server. 61 | 62 | The ddns,mac,sn need to be obtained from the technician,you can send email to xinshouyong@gl-inet.com for information 63 | 64 | The glconfig configuration is as follows 65 | 66 | ``` 67 | config service 'info' 68 | option ddns 'xxxx' 69 | option mac 'xx:xx:xx:xx:xx:xx' 70 | option sn 'xxxxxxxxxx' 71 | 72 | config service 'cloud' 73 | option enable '1' 74 | option check_status '1' 75 | option serverzone 'gslb-jp.goodcloud.xyz' 76 | ``` 77 | 78 | 79 | Set firmware version information 80 | 81 | ``` 82 | echo "3.027" > /etc/glversion 83 | ``` 84 | 85 | Restart the `MQTT` service 86 | ``` 87 | /etc/init.d/gl_mqtt restart 88 | ``` 89 | 90 | Register device information in the corresponding cloud platform 91 | 92 | After the configuration is successful, the site to site view of the router is displayed as a solid line on the cloud platform. 93 | -------------------------------------------------------------------------------- /openwrt-x86-64-generic-rootfs.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gl-inet/X86-OpenWrt/9bf4fc56d2dc3d0e4e32c44294d29aedb2c09953/openwrt-x86-64-generic-rootfs.tar.gz --------------------------------------------------------------------------------