Linux firewall settings

Source: Internet
Author: User
Tags ftp ssh port number firewall

Linux firewall settings

"Task description"

(1) Set the network card IP address is 192.168.1.234, the subnet mask is 255.255 255.0, and the gateway is 192.168.1.1.

(2) Set DNS to 61.177.7.1.

(3) Linux firewall settings, disable SELinux, enable firewall, trust www, FTP, SSH, SMTP port.

(4) Set up a firewall so that the TCP protocol can be trusted POP3 port.

"Task Implementation"

(1) Set the network card IP address is 192.168.1.234, the subnet mask is 255.255 255.0, and the gateway is 192.168.1.1.

Select the system → administration → network command to start the Network Configuration window as shown in Figure 5-48. Select the device (j) tab, and the NIC named eth0 should be installed (if not, you can click the New button in the toolbar to add a network card).

Double-click the network card in the diagram and enter the IP address, subnet mask, and gateway address in the New dialog box, as shown in Figure 5-49, and then clicking the OK (0) button.

Return to the Network Configuration window, select the network adapter, and click the "Activate" button in the toolbar to make the newly configured networking parameters effective.

Hint/NOTE: must be "activated" and only the newly configured network parameters will take effect after "activate".

(2) Set DNS to 61.177.7.1, select the DNS tab in the diagram and enter the DNS server address as shown in Figure 5-50.

(3) Linux firewall settings, disable SELinux, enable firewall, trust www, FTP, SSH, SMTP port, select "System" → "Management" → "Security level and Firewall" command, start the Security Level Settings window, select the SELinux (s) tab, "Disable" SELinux, as shown in Figure 5-51.

Select the firewall options (F) tab, enable firewall, and in the Trusted Services list box, select the WWW (HTTP), FTP, SSH, SMTP, and so on check boxes, as shown in Figure 5-52.

(4) Set up a firewall that trusts the TCP protocol POP3 port. In the Security Level Settings window, click the other Ports Drop-down button, as shown in Figure 5-33, click the Add (A) button, and the dialog box shown in Figure 5-54 appears, enter the POP3 port number 110 in the Port text box, select TCP for protocol, and then click the OK (O) button to return to Security Level Settings window, click the Apply (A) button to apply the security level you have set.

"Theoretical Knowledge"

Common services correspond to ports as shown in table 5-1.

"Knowledge development"

(1) The commands for configuring and consulting the network in CentOS are ifconfig,linux firewall settings with command iptables.

(2) SELinux (secrity enhanced Linux) is an access control mechanism used to protect file security.

Source: Server Home (http://server.zzidc.com)

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.