After connecting to the wireless network in ubuntu, share the network to the LAN (establish a ubuntu route)

Source: Internet
Author: User

After connecting to the wireless network in ubuntu, share the network to the LAN (establish a ubuntu route) to introduce the Ubuntu route implementation in detail, and give a full explanation of the Ubuntu route sharing over the Internet. Ubuntu Declaration: software should be provided free of charge, software tools should be available in the form of local languages without sacrificing any functionality, and people should have the freedom to customize and change their software, this includes any method that they consider appropriate. 1. ubuntu route implementation 2. other systems (such as the MacOSX series and window series) share the internet. connect the wireless router to the internet and establish a wireless network wlan. The intranet address 192.168.2.1 is used to connect to the wlan of ubuntu, and the connection between Ubuntu and window7 is used to form the Intranet. 4. ubuntu route dynamically obtains the URL e from the wireless router. g.192.168.2.3 5. ubuntu sets the Intranet URL ubuntu ---> sudo ifconfig eth0 10.0.0.1 netmask 255.255.255.0 (can only be used once) multiple times: in the network settings, to wired, in this way, configure window7 ---> network and sharing center ---> change adapter options -- (right-click)> properties ---> Internet Protocol Version 4 ---> properties ---> IP10.0.0.2, subnet mask 255.255.0, gateway 10.0.0.1, DNS 192.168.2.1 mac ---> networkpreference-> ethernet-> manual, IP address 10.0.0.2, netmask 255.255.0, gateway 10.0.0.1, name server 192.168.2.1 6. enable ip_forwarding In ubuntu (important) sudoecho '1'>/proc/sys/net/ipv4/ip_forward: If this message is reported, "bash: /proc/sys/net/ipv4/ip_forward: the permission is not enough. You can use "sudovi/proc/sys/net/ipv4/ip_forward" to view the value, if it is 1, you don't need to worry about it. If not, modify it to 1. 7. ubuntu route setting rules (very important: we recommend that you copy and paste a row. If you enter a wrong word, it may be ineffective) sudosu iptables-F iptables-a forward-j ACCEPT iptables-t nat-a postrouting-j MASQUERADE service iptables save 8. run the ping command on another machine to test whether the Ubuntu route ping192.168.2.1 pingwww.ubuntu.org is successfully set up.

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.