/interface bridge
add name=bridge-docker
/interface veth
add address=172.20.0.2/24 gateway=172.20.0.1 gateway6="" name=veth1-bgp
/interface list member
add interface=veth1-bgp list=LAN
/interface bridge port
add bridge=bridge-docker interface=veth1-bgp
/ip address
add address=172.20.0.1/24 interface=bridge-docker network=172.20.0.0
/container envs
add key=DNSTAP name=bgp value=172.20.0.3
add key=DNSTAP_SECONDIP name=bgp value=172.20.0.4
add key=ROUTE name=bgp value=192.168.50.1
add key=ROUTE_SECOND name=bgp value=192.168.60.1
/container mounts
add dst=/data name=storage src=/storage
/container
add envlist=bgp remote-image=oneevil/bgp-server:latest interface=veth1-bgp logging=yes \
mounts=storage root-dir=containers/bgp start-on-boot=yes workdir=/
/routing bgp connection
add as=65010 disabled=no local.address=172.20.0.1 .role=ebgp multihop=yes \
name=bgp remote.address=172.20.0.2/32 .as=64515 .port=179 router-id=\
172.20.0.1 routing-table=main
Below are the environment variables used to configure the network settings:
| Variable | Description |
|---|---|
DNSTAP | The first IP address of the local DNS server configured with dns-server. |
DNSTAP_SECONDIP | The second IP address of the local DNS server with dns-server (optional). |
ROUTE | The IP address of the gateway used for routing. |
ROUTE_SECOND | The second IP address of the gateway used for routing (optional). |
Note: Parameters marked as optional can be omitted if you are using a single route.
The container includes the following mount configuration:
add dst=/data name=storage src=/storage
This mount point (/data) contains two folders:
staticstatic_secondEach of these folders contains .txt files with static routing rules.
.txt)route 64.233.165.94/32 reject;
route 35.207.188.57/32 reject;
route 35.207.81.249/32 reject;
route 35.207.171.222/32 reject;
route 195.62.89.0/24 reject;
route 66.22.192.0/18 reject;
route 64.71.8.96/29 reject;
route 34.0.240.0/22 reject;
route 12.129.184.160/29 reject;
Note: You can include multiple
.txtfiles in each folder. All valid route entries will be processed automatically.
After modifying the files in the static and/or static_second folders, it is necessary to apply the changes for them to take effect.
Restart the container:
Using the container's shell (recommended):
/container shell 0
# birdc configure
Content type
Image
Digest
sha256:41893510d…
Size
4.4 MB
Last updated
over 1 year ago
docker pull oneevil/bgp-server