-
Notifications
You must be signed in to change notification settings - Fork 39
Host Networking
brabo edited this page Aug 15, 2017
·
1 revision
If you have usb-eth selected on your device and booted it up, a new interface should appear in ifconfig
output. If you only had eth0 before, this should be eth1.
If you are running qemunet, the host should have gotten a frost0 interface now. The following examples will use frost0, if you need eth1 there, substitute frost0 with eth1. Also do note you may need to adapt the subnet to the one you setup in Frosted's Kconfig!
ifconfig frost0 192.168.20.1 netmask 255.255.255.0 broadcast 192.168.20.255
echo 1 | tee /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -s 192.168.20.150/32 -o eth0 -j MASQUERADE
Note: if you are on WiFi and not cabled, you probably have to replace eth0 in this example with wlan0 or similar.
It is also possible to make the host interface come up automatically:
# cat /etc/network/interfaces.d/frost0
allow-hotplug frost0
iface frost0 inet static
address 192.168.20.1
netmask 255.255.255.0
network 192.168.20.0
broadcast 192.168.20.255