Start service in low port whitout root

 

Locate the systemd file of that service:

pico /usr/lib/systemd/system/grafana-server


Add this 2 lines at service


[Service]


AmbientCapabilities = CAP_NET_BIND_SERVICE
CapabilityBoundingSet = CAP_NET_BIND_SERVICE

Run:
systemctl daemon-reload 


Restart service

Openshift custom /etc/hosts config

To add custom entries in the /etc/hosts file of pods, you can utilize the hostAliases field in the deployment configuration. This field allows you to define a list of custom hostname and IP address mappings.

Here’s an example of how you can add a custom entry using the oc command-line tool:

$ oc get deployment httpd1 -o yaml | grep -A4 -B14 hostAliases
    spec:
      containers:
      - image: image-registry.openshift-image-registry.svc:5000/iamgini-dev/httpd1@sha256:b58b0719265d8b1a5beacfb42f4f2e946905c1ba4069c9949834edf97db3ace2
        imagePullPolicy: Always
        name: httpd1
        ports:
        - containerPort: 8080
          protocol: TCP
        - containerPort: 8443
          protocol: TCP
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      hostAliases:
      - hostnames:
        - myadded.example.com
        ip: 192.168.1.1
      restartPolicy: Always

 

https://www.techbeatly.com/adding-custom-entries-in-etc-hosts-file-in-kubernetes-and-openshift-containers/

Renew OpenVPN certificate

 mv /etc/openvpn/easy-rsa/pki/reqs/server_xyzblablabla.req server_xyzblablabla.req.backup

mv /etc/openvpn/easy-rsa/pki/private/server_xyzblablabla.key server_xyzblablabla.key.backup

mv /etc/openvpn/easy-rsa/pki/issued/server_xyzblablabla.crt server_xyzblablabla.crt.backup

mv /etc/openvpn/server_xyzblablabla.crt server_xyzblablabla.crt.backup

mv /etc/openvpn/server_xyzblablabla.key server_xyzblablabla.key.backup

cd /etc/openvpn/easy-rsa

./easyrsa build-server-full server_xyzblablabla nopass

cp /etc/openvpn/easy-rsa/pki/issued/server_xyzblablabla.crt /etc/openvpn

cp /etc/openvpn/easy-rsa/pki/private/server_xyzblablabla.key /etc/openvpn

NAT IP to different address with iptables

Send request from IP address to another IP

iptables -t nat -A OUTPUT -d 10.10.11.11 -j DNAT --to-destination 10.20.11.11

Packets to 10.10.11.11 will be sent to 10.20.11.11


View rule: 

iptables -t nat -L

Flush rule:

iptables -t nat -F

Create NFS share

1 -  NFS server config

Edit /etc/exports

/backupnfs  10.10.10.130(rw)

#oracle linux
/backupnfs  10.10.10.132(rw,all_squash,anonuid=1001,anongid=1001)


Run 

exportfs -v

exportfs -ra 

OR 

service nfs-server reload

2 - NFS client
 

Edit /etc/fsatb

 mkdir /backupnfs

#NFS share
10.10.0.158:/backupnfs /backupnfs nfs hard,bg,proto=tcp,suid,rsize=32768,wsize=32768,noac 0 0

Run
systemctl daemon-reload

Updatable objects appear as 'no longer supported'

 

Symptoms

  • In some scenarios, the following validation warning appears on an updatable object: "Object is no longer supported. Enforcing security for this object is not possible." However, the object is still available in the updatable objects picker.

Solution

Updatable objects use CloudGuard infrastructure. To resolve this issue:

  1. Restart the CloudGuard controller by running these commands on the Security Management Server:

    • cloudguard stop

    • cloudguard start

  2. Open the updatable objects pane

Notes:
  • If you are using Smart-1 Cloud Contact Check Point Support to solve the issue.
  • If you are using Multi-Domain Management Server, run the commands on the MDS level.

 

Mount CIFS share on oracle linux

Install CIFS

 yum install cifs-utils -y

mount -t cifs -o username=USER,password=PASSWORD,workgroup=GROUP/AD,file_mode=0777,dir_mode=0777 //PATH_TO_SHARE /MOUNT_POINT

Example:

mount -t cifs -o username=user,password=Teste123,workgroup=localdomain,file_mode=0777,dir_mode=0777 //10.30.0.181/share$ /mnt/remotefolder

Checking Root Account Status

  Checking Local Root Account Status Run sudo passwd -S root : Look for the status letter in the output. An L means the account is locked (...

Mais vistos