Table of Contents

RHEL

PATCH

yum repolist all
yum check-update
yum check-update --security
yum clean all
yum updateinfo
yum update
yum update --security
yum-complete-transaction

Firewall

RHEL7

Open http(s):

firewall-cmd --zone=public --add-service=http --permanent
firewall-cmd --zone=public --add-service=https --permanent

Activate:

firewall-cmd --reload

Test:

iptables -L | grep https
iptables -L | grep http

Example-Output:

[root@testhost ~]# iptables -L |grep https
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:https ctstate NEW

Open firewall port tcp/2888 to zone “public” to anybody:

firewall-cmd --zone=public --add-port=2888/tcp --permanent
firewall-cmd --reload

Open firewall port for zone “public” to particularry IP:

firewall-cmd --permanent --zone=public --add-rich-rule='rule family="ipv4" source address="136.230.49.56/30" port protocol="tcp" port="9200" accept'
firewall-cmd --permanent --zone=public --add-rich-rule='rule family="ipv4" source address="136.230.49.56/32" port protocol="tcp" port="9200" accept'

List zones:

firewall-cmd --list-all-zones

Show zone content:

firewall-cmd --info-zone=public

RHEL6

lokkit --port=80:tcp --update
lokkit --port=443:tcp --update

Config file:

/etc/sysconfig/system-config-firewall
# Configuration file for system-config-firewall

--enabled
--port=80:tcp

Check:

iptables -L -n |grep 80
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:80

NETWORK

Related files:

/etc/hosts
/etc/sysconfig/network
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/resolv.conf

/etc/sysconfig/network-scripts/ifcfg-eth0:

DEVICE=eth0
HWADDR=00:0c:29:9c:37:ba
TYPE=Ethernet
UUID=a23f59eb-0246-451f-bb56-5a256403b722
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
IPADDR=192.168.0.5
NETMASK=255.255.255.0
DNS2=8.8.8.8
GATEWAY=192.168.0.2
DNS1=10.2.206.102
IPV6INIT=no

/etc/sysconfig/network:

NETWORKING=yes
HOSTNAME=RHEL6-6

Register

subscription-manager config --server.proxy_hostname=proxy.example.com --server.proxy_port=8080 --server.proxy_user=admin --server.proxy_password=secret
subscription-manager register --username user@test.de --password mysecret
subscription-manager register --username user@test.de --password mysecret --auto-attach
subscription-manager attach --auto
linux/rhel.txt · Last modified: 2017/12/28 16:26 by tmade
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki