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, and software tools should be available in the form of local languages without sacrificing any functionality... 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.
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.