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 "> > 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 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:


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)

Related Article

Beyond APAC's No.1 Cloud

19.6% IaaS Market Share in Asia Pacific - Gartner IT Service report, 2018

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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: and provide relevant evidence. A staff member will contact you within 5 working days.