My Linux Code.

Home‎ > ‎

Make your PC act as Router(in Ubuntu)

Configuring IP tables. (Host Side)

Configuring the interface.

plug the usb cable configure usb0 interface.
sudo ifconfig usb0 192.168.100.1 up

Installing IP tables

apt-get install iptables

Installing iptables scripts.

untart the scripts:
sudo tar -zvxf scripts.tgz -C /

Enabling Ip forwarding

sudo sysctl -w net.ipv4.ip_forward=1

restart the iptables.

sudo /etc/init.d/firewall restart

Target side USB Net Configuration.

Configuring interface

ifconfig usb0 192.168.100.2 up
route add default gw 192.168.100.1
Note: Pl check the dns configurations in case you are accessing internet.

Testing:

You can try pinging any site by telneting the target board.