Changes between Version 18 and Version 19 of Nmm2022/Agenda/oxidize
- Timestamp:
- Jul 14, 2022, 3:48:06 AM (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Nmm2022/Agenda/oxidize
v18 v19 10 10 • Configured PFsense VM. '''If PFsense in your setup is incomplete''', replace it with this VM and adjust network configurations if required. We recommend using the wired network as much as possible. [https://docs.learn.ac.lk/index.php/s/xNKnIMShvRdUFWV] 11 11 12 2. Ubuntu 20.04 Server with LibreNMS installed (Use this provided VM to replace '''Monitoring_Server''' in your setup [https://docs.learn.ac.lk/index.php/s/ WmuORn2bAnU7yNY])[[BR]]12 2. Ubuntu 20.04 Server with LibreNMS installed (Use this provided VM to replace '''Monitoring_Server''' in your setup [https://docs.learn.ac.lk/index.php/s/yWmI7pZCIV8lf9o])[[BR]] 13 13 14 14 3. Gmail account with 2-Step Verification ''On''. … … 30 30 }}} 31 31 32 You may run '''oxidized''' command (below last command) 2 to 3 times to generate all configurations. It is recommended '''not to''' run oxidized as root. 33 34 {{{ 35 useradd -s /bin/bash -m oxidized 36 su - oxidized 37 oxidized 38 }}} 39 40 32 41 '''LibreNMS Integration''' 33 42 … … 59 68 '''Oxidized Configuration''' 60 69 61 Create the oxidized user. 62 63 {{{ 64 useradd -s /bin/bash -m oxidized 65 sudo su - oxidized 66 oxidized 70 Open oxidized main configuration file. 71 72 {{{ 73 su - oxidized 67 74 nano .config/oxidized/config 68 75 }}} … … 180 187 '''Postfix Installation''' 181 188 182 Postfix will be installed to have an email notification of configuration changes. 189 Postfix will be installed to have an email notification of configuration changes. Run the following commands as root user. 183 190 184 191 {{{ … … 186 193 }}} 187 194 188 Select ''Internet Site'' to enable Postfix to sent and receive mails and press ''Enter'' to proceed. 189 190 Put a suitable ''domain name'' for ''System mail name'' and proceed. 195 Select ''Internet Site'' (default option) to enable Postfix to sent and receive mails and press ''Enter'' to proceed. 196 197 [[Image(internet site.png, 700px)]][[BR]] 198 199 Put '''oxidized.learn.com''' for ''System mail name'' and proceed. 200 201 [[Image(mail name.png, 1700px)]][[BR]] 191 202 192 203 '''Gmail Configuration''' … … 210 221 }}} 211 222 212 Go through file carefully and add / update the necessary lines as below. Don't fully remove any default line. Some default lines are also depicted in the below configuration to aid positioning lines in the correct place. 223 Go through file carefully and add / update the necessary lines as below. Don't fully remove any default line. Some default lines are also depicted in the below configuration to aid positioning lines in the correct place. 213 224 214 225 {{{ … … 222 233 smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt 223 234 235 smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination 236 myhostname = oxidized 224 237 alias_maps = hash:/etc/aliases 225 238 alias_database = hash:/etc/aliases 226 239 myorigin = /etc/mailname 240 mydestination = $myhostname, oxidized.learn.com, oxidized, localhost.localdomain, localhost 227 241 relayhost = [smtp.gmail.com]:587 228 242 mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 … … 251 265 postmap /etc/postfix/sasl_passwd 252 266 systemctl restart postfix 253 }}} 254 255 Check email sending. Replace '''oxidizedfor''' accordingly. 267 apt install mailutils 268 }}} 269 270 Check email sending. Replace '''oxidizedfor''' accordingly. Check the gmail inbox (also the spam folder). You may have to refresh your gmail inbox several times. 256 271 {{{ 257 272 echo "Test Postfix Gmail SMTP Relay" | mail -s "Postfix Gmail SMTP Relay" oxidizedfor@gmail.com 258 273 }}} 274 259 275 An email will be sent to the Gmail account after a saved configuration change, when Oxidized get refreshed. 260 276