I want to run my UML istance with network
In the host machine I create the script
USER=myname
BRIDGENAME=br0
tunctl -t tap0 -u $USER
ip link set tap0 up
/usr/sbin/brctl addif $BRIDGENAME tap0
ip addr add 10.2.0.5/24 dev tap0
The tap0 is created and no error is reported.
After this I launch the uml istance
/usr/bin/linux ubda=fsroot mem=1024M con0=fd:0,fd:1 con=pts eth0=ethertap,tap0,10.2.0.5
Then I enter in the uml istance with minicom and I try to configure the network
ip addr add 10.2.0.6/24 dev eth0
ip route add default via 10.2.0.5
Error: Nexthop has invalid gateway.
What I miss? Why is not comunicating?
I have tried also using the classical iptables rules for natting
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -A FORWARD -i tap0 -o br0 -j ACCEPT
iptables -A FORWARD -i br0 -o tap0 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
iptables -t nat -A POSTROUTING -o br0 -j MASQUERADE
but nothing change.
Asked by elbarna
(13690 rep)
Feb 5, 2020, 04:53 PM
Last activity: Feb 5, 2020, 06:43 PM
Last activity: Feb 5, 2020, 06:43 PM