mirror of
https://github.com/AlbrechtL/openwrt-docker.git
synced 2026-10-15 08:01:26 +00:00
Add option to not attach a WAN interface.
This commit is contained in:
+10
-5
@@ -6,16 +6,21 @@ services:
|
||||
image: "openwrt-docker-arm64"
|
||||
|
||||
environment:
|
||||
DEBUG: "y"
|
||||
#DEBUG: "y"
|
||||
#IS_U_OS_APP: "true"
|
||||
|
||||
# Define number of VM CPUs
|
||||
CPU_COUNT: 2
|
||||
|
||||
# Define which physical or virtual interfaces shall be attach direct to OpenWrt
|
||||
#WAN_IF: "enx00e04c0407a6"
|
||||
#LAN_IF: "enx00e04d68033f"
|
||||
#LAN_IF: "veth" # veth pair between OpenWrt and host system
|
||||
#FORWARD_LUCI: "true" # Make LuCI OpenWrt web interface accessible via host LAN
|
||||
#WAN_IF: "enx00e04c0407a6" # Use this option to define a specific physical Ethernet interface
|
||||
WAN_IF: "none" # No WAN interface defined. This is useful if OpenWrt WAN acts a USB Wi-Fi client or as USB cellular modem
|
||||
|
||||
LAN_IF: "veth" # veth pair between OpenWrt and host system
|
||||
#LAN_IF: "enx00e04d68033f" # Use this option to define a specific physical Ethernet interface
|
||||
|
||||
# Make LuCI OpenWrt web interface accessible via host LAN
|
||||
#FORWARD_LUCI: "true"
|
||||
|
||||
# USB passthrough
|
||||
# Format <vendorID>:<productID> like 'lsusb' is given
|
||||
|
||||
@@ -153,6 +153,8 @@ fi
|
||||
WAN_ARGS=""
|
||||
if [[ -z "${WAN_IF}" ]]; then
|
||||
WAN_ARGS="-device virtio-net,netdev=qwan0 -netdev user,id=qwan0,hostfwd=tcp::8000-:80,hostfwd=tcp::8022-:22"
|
||||
elif [[ $WAN_IF = "none" ]]; then
|
||||
WAN_ARGS=""
|
||||
else
|
||||
HOST_WAN_IF=$WAN_IF
|
||||
attach_eth_if $HOST_WAN_IF $HOST_WAN_IF qwan0
|
||||
|
||||
Reference in New Issue
Block a user