Bash/Network

From Chorke Wiki
(Redirected from Network)
Jump to navigation Jump to search
# show config all interface
ifconfig

# see ip add  eth0 interface
ip a show eth0

# to turn off eth0 interface
ifdown eth0

# to turn on  eth0 interface
ifup eth0

Specific Port Enable

firewall-cmd --zone=public --permanent --add-port=11100/tcp
firewall-cmd --zone=public --permanent --add-port=1521/tcp
firewall-cmd --zone=public --permanent --add-port=3306/tcp
firewall-cmd --zone=public --permanent --add-port=5432/tcp
firewall-cmd --reload
netstat

Range of Port Enable

firewall-cmd --zone=public --permanent --add-port=22200-22290/tcp
firewall-cmd --zone=public --permanent --add-port=55500-55590/tcp
firewall-cmd --zone=public --permanent --add-port=11110-11119/tcp
firewall-cmd --reload
netstat

References