Configure Ubuntu Wireless Internet share

Source: Internet
Author: User
Keywords Ubuntu shared Internet
Tags aliyun business can find carrying configure connect dns find

In the absence of a switch or hub, multiple http://www.aliyun.com/zixun/aggregation/9600.html "> > Does the laptop have no way to share the surf at the same time using a network interface?" Considering that most laptops now have their own wireless network card devices, we can find a way to connect these wireless card devices to form a simple wi ...

It's often a matter of carrying a laptop to a foreign business trip, but when people share a hotel room, we may sometimes get into trouble with not being able to surf the Internet at the same time, because most hotel rooms only provide an Internet access for customers, In other words, only one customer can surf the Internet at one time using the only Internet interface in the room, while other customers are not sharing a single Internet channel to surf the web, even if they are carrying laptops. So, in the absence of a switch or hub, can multiple laptops have no way to share the same surf with a single network interface? Considering that most laptops have their own wireless network card devices, we can find a way to interconnect these wireless card devices to form a simple wireless net, Then let the wireless network through the only network export for extranet access, so that all notebook computers to share the purpose of the Internet.

Wireless Internet sharing requires several conditions:

1 Establish a hoc mode wireless network (hoc is a dedicated mode for bridging)

2 Set IP transfer allowed

3 Set Iptables forwarding to convert the IP request of a shared user to a host request

4 Set up a shared machine routing, DNS

Specific steps:

1 iwconfig eth1 Essid "* *" key s: "* * *" mode hoc

Ifconfig eth1 192.168.0.1 up

2 sudo vi/etc/sysctl.conf

Uncomment Net.ipv4.ip_forward = 1

3 sudo iptables-f

sudo iptables-p INPUT ACCEPT

sudo iptables-p FORWARD ACCEPT

sudo iptables-t nat-a postrouting-o eth0-j Masquerade

4 shared host uses static address 192.168.0.*

Subnet Mask: 255.255.255.0

Router: 192.168.0.1

DNS uses the same DNS as the host (DNS in/etc/resolv.conf)

ETH1 is a wireless network (shared by it)

Eth0 is 8631.html "> wired network (already networked)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.