Skip to content

Commit d5aff32

Browse files
author
Christoph Paasch
committed
vbox - setup
Signed-off-by: Christoph Paasch <[email protected]>
1 parent 21bd8fb commit d5aff32

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

vbox/vbox_bridge

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
# Enable IP forwarding
4+
sudo sysctl net.ipv4.ip_forward=1
5+
6+
# Create a TAP as your current logged in user (replace with -u YOUR-USER-NAME if you want...)
7+
sudo tunctl -u $USER
8+
9+
# Give your TAP (tap0) an IP address and enable it (make sure the IP address is OUTSIDE the DHCP range on your router)
10+
sudo ip addr add 192.168.1.150/24 dev tap0
11+
sudo ip link set tap0 up
12+
13+
sudo iptables -t nat -A POSTROUTING -s 192.168.1.1 -j MASQUERADE

0 commit comments

Comments
 (0)