ip link set wlp2s0 promisc on

ip link set enp1s0 promisc on

docker stop $(docker ps -a -q) #停止所有服务

docker rm $(docker ps -a -q) #删除所有容器

docker network create -d macvlan --subnet=192.168.10.0/24 --gateway=192.168.10.1 -o parent=wlp2s0 maclan

docker network create -d macvlan --subnet=192.168.1.0/24 --gateway=192.168.1.1 -o parent=enp1s0 maclan

docker network create -d macvlan --subnet=192.168.1.0/24 --gateway=192.168.1.1 -o parent=enp1s0 macwan

docker network create -d bridge --subnet=192.168.10.0/24 --gateway=192.168.10.1 bridge_openwrt

docker network connect maclan openwrt

docker exec -it openwrt /bin/sh

create_ap -n wlp2s0 -g 192.168.10.21 xxx Donkey1213

ifconfig br-7875544b7a46 192.168.10.20 netmask 255.255.255.0

docker run --restart always -d --name=openwrt --network maclan --privileged kiddin9_openwrt /sbin/init

docker run --restart always -d --name=openwrt --privileged kiddin9_openwrt /sbin/init

docker run --net wifi --privileged -it OpenWrt /bin/bash

docker run --restart always -d --name=OpenWrt --network wifi --privileged kiddin9_openwrt /sbin/init

 docker run –restart always –name openwrt kiddin9_openwrt -d –network openwrt –privileged /sbin/init

nmcli device wifi hotspot con-name xxx ssid xxx password Donkey1213

nmcli connection modify xxx 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared ipv4.address 192.168.10.1/24 ipv4.gateway 192.168.10.2

nmcli connection up xxx

nmcli connection down xxx

nmcli con modify xxx ipv4.method manual

nmcli con modify xxx ipv4.gateway 192.168.10.1

nmcli con modify xxx ipv4.address 192.168.10.3/24

nmcli connection show xxx #查看热点信息

traceroute baidu.com

docker run --net wifi --ip 192.168.10.10 --mac-address=<MAC_ADDRESS> --device=<NIC_DEVICE_NAME> -it myimage /bin/bash

config interface 'lan'

    option ifname 'eth0'
    option proto 'static'
option netmask '255.255.255.0'
option gateway '192.168.0.1'
option ip6assign '60'
option dns '8.8.8.8 114.114.114.114'
option ipaddr '192.168.0.254'
option broadcast '192.168.0.255'

标签: none

添加新评论