This repository has been archived by the owner on Jun 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathpre-requisites
199 lines (160 loc) · 7.1 KB
/
pre-requisites
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
____ ____ _____ ____ _____ ___ _ _ ___ ____ ___ _____ _____ ____
| _ \| _ \| ____| | _ \| ____/ _ \| | | |_ _/ ___|_ _|_ _| ____/ ___|
| |_) | |_) | _| _____| |_) | _|| | | | | | || |\___ \| | | | | _| \___ \
| __/| _ <| |__|_____| _ <| |__| |_| | |_| || | ___) | | | | | |___ ___) |
|_| |_| \_\_____| |_| \_\_____\__\_\\___/|___|____/___| |_| |_____|____/ #1
----------------------------------------------------------------------------
OS SUPPORT: CentOS 8.1-131911.0.8.el8.x86_64
[ by: ARI3L | y2k ] #IRCAyuda STAFF
----------------------------------------------------------------------------
#1 - Update OS and change Host. (root)
NOTE: After change Hostname need to reboot the machine.
NOTE: Need to set a subdomain on the server for make it work well.
NOTE: Need a Static local IPV4 Need to check: /etc/sysconfig/network-scripts/INTERFACE*
NOTE: our interface looks like: ifcfg-enp0s3
NOTE: This Config is only on IPv4 if you dont have a IPV6 Tunnel config.
------------------------------------------------------------------------------
[root@irc ~]# yum clean all
[root@irc ~]# yum clean metadata
[root@irc ~]# yum update
[root@irc ~]# yum install -y systemd nano
[root@irc ~]# hostnamectl set-hostname irc.undernet.org
PLEASE NOTE: when we say "irc.undernet.org" means write your own hostname.
NOTE: You can use hostnamectl. if you change with. /etc/hostname need to change /etc/hosts too.
NOTE: You need to set your hostname and save file. Crt + X + Y + Intro
[root@irc ~]# nano /etc/hostname
irc.undernet.org
[root@irc ~]# nano /etc/hosts
127.0.0.1 irc.undernet.org
[root@irc ~]# reboot
#2 - Install / Development Tools / tcl-devel / perl / xinetd / authd
[root@irc ~]# yum groupinstall -y 'Development Tools'
[root@irc ~]# yum install -y tcl-devel perl xinetd authd
#3 - Firewall Start / enable / status your firewall.
[root@irc ~]# systemctl start firewalld
[root@irc ~]# systemctl enable firewalld
[root@irc ~]# systemctl status firewalld
firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2020-12-19 13:58:26 CET; 1h 7min ago
[root@irc ~]# firewall-cmd --list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: enp0s3
sources:
services: cockpit dhcpv6-client ssh
ports:
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
[root@irc ~]#
NOTE: This is how you check ZONES.
[root@irc ~]# firewall-cmd --get-default-zone
public
[root@irc ~]#
NOTE: This is how you check ACTIVE ZONES.
[root@irc ~]# firewall-cmd --get-active-zones
libvirt
interfaces: virbr0
public
interfaces: enp0s3
[root@irc ~]#
NOTE: This is how you LIST ALL ZONES.
[root@irc ~]# firewall-cmd --list-all-zones
[root@irc ~]#
NOTE: Check Directory for zones.
[root@irc ~]# ls -l /usr/lib/firewalld/zones/
total 44
-rw-r--r--. 1 root root 299 Aug 11 22:53 block.xml
-rw-r--r--. 1 root root 293 Aug 11 22:53 dmz.xml
-rw-r--r--. 1 root root 291 Aug 11 22:53 drop.xml
-rw-r--r--. 1 root root 304 Aug 11 22:53 external.xml
-rw-r--r--. 1 root root 397 Aug 11 22:53 home.xml
-rw-r--r--. 1 root root 412 Aug 11 22:53 internal.xml
-rw-r--r--. 1 root root 809 Nov 26 2019 libvirt.xml
-rw-r--r--. 1 root root 729 Nov 13 23:19 nm-shared.xml
-rw-r--r--. 1 root root 343 Aug 11 22:53 public.xml
-rw-r--r--. 1 root root 162 Aug 11 22:53 trusted.xml
-rw-r--r--. 1 root root 339 Aug 11 22:53 work.xml
[root@irc ~]#
NOTE: How to Open Ports with FirewallD 80, 443, 53, 113, 110, 6667, 4400, 25, 22
NOTE: firewall-cmd --add-port=6667/tcp can be TCP or UDP firewall-cmd --add-port=6667/udp
NOTE: Port 113 / 25 / 6667 / need to be open TCP/UDP for work correctly.
[root@localhost ~]# firewall-cmd --add-port=6667/tcp
success
[root@irc ~]#
[root@irc ~]# firewall-cmd --list-port
6667/tcp 80/tcp 443/tcp 53/tcp 113/tcp 4400/tcp 25/tcp 110/tcp 22/tcp
[root@irc ~]#
NOTE: How to REMOVE an OPEN port!
[root@irc ~]# firewall-cmd --remove-port=6667/tcp
success
[root@irc ~]#
# 4 - Running xinetd / authd
[root@irc ~]# service xinetd start
Redirecting to /bin/systemctl start xinetd.service
[root@irc ~]#
NOTE: Check if the xinetd is working well!
[root@irc ~]# ps aux | grep xinetd
root 36644 0.0 0.0 46724 508 ? Ss 15:29 0:00 /usr/sbin/xinetd -stayalive -pidfile /var/run/xinetd.pid
root 36686 0.0 0.0 12112 996 pts/2 S+ 15:30 0:00 grep --color=auto xinetd
[root@irc ~]#
#5 - Make sure you know all info about your IP / Netmask.
NOTE: All ifconfig can change. Not going to show the same result!
NOTE: inet 192.168.1.133 <-- Is your IP.
[root@irc ~]# ifconfig
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.133 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::19bc:3208:16a3:69b0 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:48:44:98 txqueuelen 1000 (Ethernet)
RX packets 801585 bytes 1167419875 (1.0 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 92290 bytes 12250401 (11.6 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 24 bytes 2040 (1.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 24 bytes 2040 (1.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:9c:12:f5 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@irc ~]#
--------------------------------
[root@irc ~]# ifconfig | grep inet
inet 192.168.1.133 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::19bc:3208:16a3:69b0 prefixlen 64 scopeid 0x20<link>
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
[root@irc ~]#
--------------------------------
[root@irc ~]# ifconfig | grep ether
ether 08:00:27:48:44:98 txqueuelen 1000 (Ethernet)
ether 52:54:00:9c:12:f5 txqueuelen 1000 (Ethernet)
[root@irc ~]#
--------------------------------
[root@irc ~]# ip route show
default via 192.168.1.1 dev enp0s3 proto dhcp metric 100
192.168.1.0/24 dev enp0s3 proto kernel scope link src 192.168.1.133 metric 100
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown
[root@irc ~]#
--------------------------------
[root@irc ~]# ip route show | grep default
default via 192.168.1.1 dev enp0s3 proto dhcp metric 100
[root@irc ~]#
--------------------------------
[root@irc ~]# ip route show | grep default | awk {'print $3'}
192.168.1.1
[root@irc ~]#