Article Title: CIPE server configuration in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Copy the sample configuration file in/usr/share/doc/cipe-version/samples/to/etc/cipe/(the version here is the CIPE version installed on your system ). After copying, you will need to edit/etc/cipe/options. cipcbx (x is an incremental number starting from 0, which is provided for customers who want to have more than one CIPE connection on the CIPE server) file to include your LAN subnet address and public firewall IP address. The following is an example of the options file in the Red Hat Enterprise Linux cipe rpm. In this example, It is renamed to options. cipbcb0:
# Surprise, this file allows comments (but only on a line by themselves)
# This is probably the minimal set of options that has to be set
# Without a "device" line, the device is picked dynamically
# The peer's IP address
Ptpaddr 6.5.4.3
# Our CIPE device's IP address
Ipaddr 6.7.8.9
# My UDP address. Note: if you set port 0 here, the system will pick
# One and tell it to you via the ip-up script. Same holds for IP 0.0.0.0.
Me bigred.inka.de: 6789
#... And the UDP address we connect to. Of course no wildcards here.
Peer blackforest.inka.de: 6543
# The static key. Keep this file secret!
# The key is 128 bits in hexadecimal notation.
Key xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Ptpaddr is the CIPE address of the remote LAN. Ipaddr is the e IP address of the workstation. The me address is a public IP address of the customer. It sends UDP packets over the Internet. Peer is the public IP address of the CIPE server. Note that the IP address of the customer workstation is 0.0.0.0 because it uses dynamic connection. The CIPE client processes the connection to the CIPE server. The key field (represented by x; your key should be the key) is a shared static key. The key must be the same on both ends, otherwise the connection cannot be established. For more information about how to generate a shared static key for your CIPE machine, see section 6.8.
This is the edited/etc/cipe/options. cipcb0 that the customer workstation will use:
This is the/etc/CIPE/options. cipcb0 file of the cipe Server:
Ptpaddr 10.0.1.1
Ipaddr 10.0.1.2
Me LAN. EXAMPLE. COM: 6969
Peer 0.0.0.0
Key 123456ourlittlesecret7890shhhh
Configure the customer's CIPE
After successfully configuring the CIPE server and testing its functions, you can now use this connection on the client machine.
CIPE customers should be able to automatically connect to and disconnect CIPE. Therefore, CIPE includes built-in mechanisms to customize the settings for individual users. For example, a remote employee can connect to the CIPE device on the LAN by typing the following command:
/Sbin/ifup cipcb0
The device should appear automatically; firewall rules and routing information should also be configured together with the connection. Remote staff should be able to use the following command to terminate the connection:
/Sbin/ifdown cipcb0
The configuration customer needs to create a script to run after the device is loaded. The service configuration itself can be configured locally through a user-created file/etc/sysconfig/network-scripts/ifcfg-cipcb0. This file contains some parameters, such as the parameter used to determine whether the CIPE connection occurs during boot, and the parameter representing the CIPE device name. The following is a ifcfg-cipcb0 file for a remote client connected to the CIPE Server:
# This is the device for which we add a host route to our CIPE peer through.
# You may hard code this, but if left blank, we will try to guess from
# The routing table in the/etc/cipe/ip-up.local file.
PEERROUTEDEV =
# We need to use internal DNS when connected via cipe.
DNS = 192.168.1.254
The name of the CIPE device is cipcb0. The CIPE device will be loaded at the boot time (configured through the ONBOOT field) and will not use a boot protocol (such as DHCP) to receive the IP address of the device. The PEERROUTEDEV field determines the name of the client's CIPE server device. If no device is specified in this field, it is determined after the device is loaded.
If your internal network is behind the firewall, you need to set rules to allow the CIPE interface on the client machine to send and receive UDP groups. For more information about configuring firewall for Red Hat Enterprise Linux, see Chapter 7th. In this configuration example, iptables rules are used.
Note
The customer should configure this, so all localized parameters are placed in a file created by the user called/etc/cipe/ip-up.local. After the CIPE session is disabled, use the/etc/cipe/ip-down.local to restore the local parameter.
The firewall on the customer's machine should be configured to accept the cipe udp encapsulation group. There may be a large gap between rules, but basic acceptance of UDP groups is required for the CIPE connection. The following iptables rules allow remote client machines connected to the LAN to perform udp cipe transmission. The last rule adds IP disguise to allow remote clients to communicate with the LAN and the Internet.
You must also add routing rules on the client machine to access the nodes behind the CIPE connection just like accessing the local network. This can be done by running the route command. In our example, the customer workstation needs to add the following network routes:
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