I am running a custom linux image on Virtual box. Also,I am using a USB-to-Ethernet connector from my Laptop to connect other clients. In the network setting, I have used bridge adapter for both interfaces i.e. eth0 and Asix (usb-to-ethernet). When I am running virtual box, eth0 is getting public IP like 10.x.x.x but eth1(USB-to_eth) is not getting any IP.
I tried to run
udhcpc on eth1 to get IP using dhcp but failed. Moreover, I assigned eth1 some IP in the same range as eth0 with eth0 as route. But still, no packets are reaching to eth0 from eth1. I tested the same by pinging other public IP via eth1 interface like
ping -I eth1 10.x.x.x but failed.
I also tried
iptables rules like below with:
echo "1" > /proc/sys/net/ipv4/ip_forward iptables -I FORWARD -i eth0 -o eth1 -j ACCEPT iptables -I FORWARD -i eth1 -o eth0 -j ACCEPT
cat /etc/network/interfaces doesn't show anything as there is no such file.