In Linux, use netpas-Linux Enterprise Application-Linux server application information. For more information, see. What is netpas is a network acceleration software, which can greatly improve the speed of mutual access between China Telecom, China Netcom, CERNET, and China tietong; it is also very helpful for CERNET users to make access to the international network. Note: netpas is charged. You can choose other free software instead.
1. Why should we use netpas in linux? If the linux network operating system does not use the internet, it will be like things in the dark, and many times linux will connect things on the international network, it is a headache for CERNET users to use the international network. It is also very tiring to find the extremely unstable agent on their own. So if linux can also use the netpas service, hey. In this case, you can appreciate the advantages. To put it simply, netpas provides us with a stable and transparent proxy.
2. Implementation ideas. Of course, you must first run netpas, while netpas currently only supports windows. Therefore, you must first have a windows environment. One idea is to use wine, and the other is to use virtual machines. I think the development of virtual machines is good, so I chose the virtual machine idea. Run windows on a virtual machine, run netpas on windows, enable the proxy service on windows, and let linux go through the windows line, so that linux can also "enjoy" The netpas service.
3. Virtual Machine selection and Internet access. There is nothing to say about it. I use virtualbox 1.4 based on my preferences .. As for the Internet access method, nat cannot work. You must allocate an independent address to both the host and client. Therefore, I chose to use the bridge method.
4. Implement Virtual Machine bridging. This is difficult. You can refer to the articles on the Internet. I am ashamed that I have not understood the principles. I just painted the pictures in the gourd tree. The following describes how I drew this picture:
4.1 go to the official http://www.virtualbox.org download corresponding to your machine package, I downloaded is virtualbox_1.4.0-21864_Debian_etch_i386.deb installed. The system will prompt that the package is missing. Use apt-get-f install to solve the problem.
4.2 install the compilation tool and related packages. During the installation process, compile the kernel module used by VirtualBox. To do this, you need to prepare basic compilation tools and packages. You can use the following commands to install them:
Sudo apt-get install build-essential linux-headers-'uname-R'
In fact, I have installed the kernel source code. Do not know if it is necessary?
4.3 now, go to the directory where the VirtualBox installation package is saved and install it using the following command:
During installation, VirtualBox requires you to accept the license agreement. In addition, the installer creates a vboxusers user group and compiles the required kernel modules.
4.4 now, you cannot start VirtualBox because your current user does not belong to the vboxusers user group. You can use the following command to add the current user (use your user name instead of "youruser" in the Command) to the vboxusers user group:
Sudo adduser youruser vboxusers
4.5 On Debian and Ubuntu-based systems, you must first install the uml-utilities tool and bridge-utils tool, which contain the virtual network device (TAP interfaces:
To enable your VM to access network interfaces, you must set the user name (usually your ubuntu Login User name) of the user running the VM) add to the uml-net user group (replace "vboxuser" with your user name "):
Sudo gpasswd-a vboxuser uml-net
Note: to make the change take effect, restart your computer.
4.6 describe the virtual network device you want to add to your Debian or ubuntu operating system, and edit/etc/network/interfaces. Here is my description:
# This file describes the network interfaces available on your system
# And how to activate them. For more information, see interfaces (5 ).
# The loopback network interface
Auto lo
Iface lo inet loopback
# The primary network interface
Allow-hotplug eth0
Iface eth0 inet manual
Up ifconfig eth0 0.0.0.0 promisc up
Auto eth0
Auto tap0
Iface tap0 inet manual
Up ifconfig $ IFACE 0.0.0.0 up
Down ifconfig $ IFACE down
Tunctl_user well (change this to your user name)
Auto br0
Iface br0 inet static
Address your ip address
Netmask 255.255.255.0
Network: your ip address. The last group is changed to 0.
Broadcast: Change your ip address in the last group to 255.
Gateway: the ip address of your gateway.
(If you use dhcp, change the above six lines to iface br0 inet dhcp)
Bridge_ports all tap0
4.7 activate the created virtual network interface and Network Bridge for the first time:
Sudo/sbin/ifup tap0
Sudo/sbin/ifup br0
This step only needs to be performed once. The interface and bridge will be automatically activated the next time the host restarts.
5. Let virtualbox use this virtual network interface. Start virtualbox, select the virtual machine that you want to use the tap0 virtual network interface just created on the main interface, click "set", and select "network" in the pop-up window ", select one network adapter (usually "network adapter 0"), select "enable network adapter", select "Host Interface" after "Connect", and select "access network cable ", in the "host network interface name", enter the name of the created virtual network interface "tap0". OK.
6. Configure the Virtual Machine NIC address. This step has been difficult for me. In fact, it is very simple. The configuration is the same as that of the br0 of the host, but the ip address can be changed to a unique one. The subnet mask, gateway, and DNS remain unchanged, just like the br0 settings.
7. Now the host and client can communicate. However, you must adjust the firewalls of both parties so that the host and client can access each other. (You can disable the firewall of the client)
8. Key Step. Linux Hosts must enable NAT to allow windows guest to access the Internet. Note that Step 2: The windows client can only communicate with the linux host and cannot access the Internet. To enable windows Internet access, add the following to your linux host iptalbes rules:
Here we mainly note that the internal network interface is br0, while the external interface is tap0, restart the firewall, OK
9. Now we have a virtual machine that bridges the internet. Next we will realize our dream of making linux enjoy the netpas service.
10. Of course, first install the netpas software in windows, and then pay for it. I think it is worth 15 RMB a month. Of course, you can also use other free similar software.
11. Next, install a proxy service software in windows. I recommend CCProxy. After installation, make the appropriate configuration so that the linux host can enjoy the CCProxy service. The specific configuration is clear at a glance. You can also refer to the online article.
12. Finally, set the proxy in the linux host. firefox xchat has corresponding settings. Other software is also available. Enter the ip address and port of the windows client (note the port set in CCProxy) to use the windows proxy service. Of course, many text software, such as apt gpg wget, are implemented by setting http_proxy environment variables or modifying their own configuration files. Provide a reference:
Export http_proxy = http://xxx.xxx.xxx.xxx: 808
13. Finally, I saw the light of victory. Enable netpas and CCProxy in windows, set a proxy in linux, and enjoy the pleasure netpas brings to you. Good luck.
14. description. You can also consider other implementation methods, such as internet Connection Sharing. Or use another network topology. You can add more information. Eth0 does not seem to work in the entire process. I set it to promisc mode and do not know whether to use it. Pay special attention to the firewall. If you are not afraid of intrusion, close the firewall between the host and the client!
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.