2018-10-02 10:17:31 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Run me using "source setup-tapif" to get exported PRECONFIGURED_TAPIF variable
|
|
|
|
# Alternatively, add "export PRECONFIGURED_TAPIF=tap0" to ~/.bashrc
|
|
|
|
|
|
|
|
# http://backreference.org/2010/03/26/tuntap-interface-tutorial/
|
|
|
|
|
|
|
|
# After executing this script, start unixsim/simhost.
|
2018-11-04 07:59:41 +00:00
|
|
|
# Enter 192.168.1.200 or "http://simhost.local/" (Zeroconf)
|
2018-10-02 10:17:31 +00:00
|
|
|
# in your webbrowser to see simhost webpage.
|
|
|
|
|
|
|
|
export PRECONFIGURED_TAPIF=tap0
|
2018-11-04 07:59:41 +00:00
|
|
|
|
|
|
|
sudo ip tuntap add dev $PRECONFIGURED_TAPIF mode tap user `whoami`
|
|
|
|
sudo ip link set $PRECONFIGURED_TAPIF up
|
|
|
|
sudo brctl addbr lwipbridge
|
|
|
|
sudo brctl addif lwipbridge $PRECONFIGURED_TAPIF
|
|
|
|
sudo ip addr add 192.168.1.1/24 dev lwipbridge
|
|
|
|
sudo ip link set dev lwipbridge up
|