0

I have installed Ubuntu 11.10

I have internet in mobile then create hotspot for access internet in laptop.

Now main thing is that how can I share that to LAN(eth0).

Path of internet

Mobile WIFI --> Laptop WIFI --> Laptop Lan --> Smart TV Lan

NIMISHAN
  • 1,575
  • 4
  • 19
  • 28

1 Answers1

2

You can run a NAT/Firewall software like Firestarter on the LAPTOP (install from the software center).

Another solution without running anything is to do the NAT manually with iptables on NAT Table postrouting using Masquerade on your wi-fi interface. See rule below:

-A POSTROUTING -o wlan0 -j MASQUERADE

and you will need to enable ip forwarding with:

/bin/echo 1 > /proc/sys/net/ipv4/ip_forward

or make it permanent with:

sudo nano /etc/sysctl.conf

Modify the line: net.ipv4.ip_forward=1

Apply: sudo sysctl -p /etc/sysctl.conf

Verify: cat /proc/sys/net/ipv4/ip_forward

Should show 1

laurent
  • 6,779