How Linux shuts down the firewall

Source: Internet
Author: User

1) effective after reboot
Open: Chkconfig iptables on
OFF: Chkconfig iptables off

2) immediate effect, failure after reboot
Open: Service iptables start
Close: Service iptables stop

It should be stated that for other services under Linux, the above command can be used to perform the open and close operations.

When the firewall is turned on, make the following settings, open the relevant port,
Modify the/etc/sysconfig/iptables file to add the following:
-A rh-firewall-1-input-m state--state new-m tcp-p TCP--dport 80-j ACCEPT
-A rh-firewall-1-input-m state--state new-m tcp-p TCP--dport 22-j ACCEPT

Chmod-r 777/path/*

Scp-r/users/hddvvi/desktop/load [Email protected]:/opt/logs/tomcat/app/tomcat_stk_nm/

MV *./html/Path

Tail-f/var/log/messages

Cat Log

Less log

More Log

TAILF log (always view print log)

MV *./html/Path

Copy from local to remote

scp/home/daisy/full.tar.gz [Email Protected]:/home/root (You will then be prompted to enter the login password of the root user of the other 172.19.2.75 host, and then the copy is copied), copy the directory plus the parameter-R

Copy from remote to local

SCP [Email protected]/172.19.2.75:/home/root/full.tar.gz/home/daisy/full.tar.gz

Pass folder with-R parameter otherwise there is not a regular file error

Scp-r bdump [Email protected]:bdump

SSH [email protected]

chmod 777 Xampp-linux-x64-5.6.14-0-installer.run

Systemctl Status VSFTPD

In the home directory there is a wwwroot directory, wwwroot under the Sinozzz directory, that is/home/wwwroot/sinozzz

First, Directory creation

Create a new sinozzz123 folder under the/home/wwwroot directory

Mkdir/home/wwwroot/sinozzz123

Second, directory replication

1. Copy the files and folders inside the/home/wwwroot/sinozzz into the home/wwwroot/sinozzz123 directory

cp-rf/home/wwwroot/sinozzz/*/home/wwwroot/sinozzz123

2. Copy the folders and files under the/home/wwwroot/sinozzz123/abc/to the home/wwwroot/sinozzz123 directory

cp-rf/home/wwwroot/sinozzz123/abc/*/home/wwwroot/sinozzz123

3. Copy the/home/wwwroot/sinozzz directory to the/home/wwwroot/sinozzz123 directory, that is, sinozzz copy into a sinozzz123 subdirectory, into/home/wwwroot/ Path of the Sinozzz123/sinozzz

Cp-rf/home/wwwroot/sinozzz/home/wwwroot/sinozzz123

Iii.. Catalog Cut

1. Use the MV command to cut the file.

If you need to cut the 1.mp3 file in the/home/wwwroot/sinozzz123/music/directory into the/HOME/WWWROOT/SINOZZZ123/ABC directory, execute the following command:

# MV/HOME/WWWROOT/SINOZZZ123/MUSIC/1.MP3/HOME/WWWROOT/SINOZZZ123/ABC

2. Use the MV command to cut the folder.

Cut the/home/wwwroot/sinozzz123/soft folder into the/HOME/WWWROOT/SINOZZZ123/ABC directory

# MV/HOME/WWWROOT/SINOZZZ123/SOFT/HOME/WWWROOT/SINOZZZ123/ABC

3. Use the MV command to cut folders and files

Cut the folders and files under the/home/wwwroot/sinozzz123/photo/to the/HOME/WWWROOT/SINOZZZ123/ABC directory

# mv/home/wwwroot/sinozzz123/photo/*/HOME/WWWROOT/SINOZZZ123/ABC

Iv. Directory renaming

Under Linux, moving files and renaming is the same command, MV (meaning of Move)

Command: MV source file name destination file name

1. Rename the/home/wwwroot/sinozzz123/index.htm to/home/wwwroot/sinozzz123/index.html

# mv/home/wwwroot/sinozzz123/index.htm/home/wwwroot/sinozzz123/index.html

2. Rename the/home/wwwroot/sinozzz123 directory to/home/wwwroot/sinozzz456

# mv/home/wwwroot/sinozzz123/home/wwwroot/sinozzz456

V. Directory deletion

Linux Delete directory is very simple, many people are still accustomed to use rmdir, but once the directory is not empty, it fell into deep distress, now use the RM-RF command.

Direct RM is available, but add two parameters-rf

That is: RM-RF directory name

-R is recursive down, no matter how many levels of directory, delete

-F is directly forcibly deleted, without any hint of meaning

1. Delete File Usage instances:

Rm-f/home/wwwroot/sinozzz456/index.html

This file will be forcibly deleted/home/wwwroot/sinozzz456/index.html

2. Clear the folder instance:

rm-rf/home/wwwroot/sinozzz456/abc/*

All files, folders, and/HOME/WWWROOT/SINOZZZ456/ABC directories in the/HOME/WWWROOT/SINOZZZ456/ABC directory will be forcibly deleted.

3. Delete the folder instance:

rm-rf/home/wwwroot/sinozzz456

Will force the deletion of the/home/wwwroot/sinozzz456 directory and all files and folders under it

To be reminded: Use this RM-RF with extreme caution, Linux does not have a recycle Bin

Of course, RM has more parameters and usage, and man RM can view the

If you are operating under the/home/wwwroot/directory, you can omit the/home/wwwroot/part of each command

How Linux shuts down the firewall

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.