20141019

share internet connection in linux via terminal


On access point side
  1. disable firewall
  2. enable packet forwarding
    # echo 1 > /proc/sys/net/ipv4/ip_forward
  3. set iptables rule for port forwarding
    # iptables -t nat -A POSTROUTING -o -j MASQUERADE
on client side:
  1. configure network interface so you can reach the access point
  2. set the access point as default gateway
    # route add default gw
  3. set dns resolution
    # echo nameserver 8.8.8.8 >> /etc/resolv.conf

No comments:

Post a Comment