This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
stellar-stellar-2022/ci/prepare_gtest_network.sh
2022-08-31 22:05:37 +08:00

13 lines
238 B
Bash

#!/usr/bin/env bash
# create tun device
ip tuntap add dev tun0 mode tun
# add ip addr for tun device
ip addr add 192.168.3.11/24 dev tun0
# kernel open ip forward
echo 1 > /proc/sys/net/ipv4/ip_forward
# start up tun0
ifconfig tun0 up