mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
31 lines
890 B
Bash
Executable file
31 lines
890 B
Bash
Executable file
#!/bin/bash
|
|
# This file is part of Firejail project
|
|
# Copyright (C) 2014-2016 Firejail Authors
|
|
# License GPL v2
|
|
|
|
brctl addbr br0
|
|
ifconfig br0 10.10.20.1/29 up
|
|
# NAT masquerade
|
|
iptables -t nat -A POSTROUTING -o eth0 -s 10.10.20.0/29 -j MASQUERADE
|
|
# port forwarding
|
|
# iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to 10.10.20.2:80
|
|
|
|
brctl addbr br-unconfigured
|
|
ifconfig br-unconfigured up
|
|
brctl addbr br1
|
|
ifconfig br1 10.10.30.1/24 up
|
|
brctl addbr br2
|
|
ifconfig br2 10.10.40.1/24 up
|
|
brctl addbr br3
|
|
ifconfig br3 10.10.50.1/24 up
|
|
brctl addbr br4
|
|
ifconfig br4 10.10.60.1/24 up
|
|
ip link add link eth0 name eth0.5 type vlan id 5
|
|
/sbin/ifconfig eth0.5 10.10.205.10/24 up
|
|
ip link add link eth0 name eth0.6 type vlan id 6
|
|
/sbin/ifconfig eth0.6 10.10.206.10/24 up
|
|
ip link add link eth0 name eth0.7 type vlan id 7
|
|
/sbin/ifconfig eth0.7 10.10.207.10/24 up
|
|
|
|
# network namespace
|
|
ip netns add red
|