Changes between Version 18 and Version 19 of Nmm2022/Agenda/oxidize


Ignore:
Timestamp:
Jul 14, 2022, 3:48:06 AM (2 years ago)
Author:
dushmantha
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Nmm2022/Agenda/oxidize

    v18 v19  
    1010•  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]
    1111
    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]]
     122. 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]]
    1313
    14143. Gmail account with 2-Step Verification ''On''.
     
    3030}}}
    3131
     32You 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{{{
     35useradd -s /bin/bash -m oxidized
     36su - oxidized
     37oxidized
     38}}}
     39
     40
    3241'''LibreNMS Integration'''
    3342
     
    5968'''Oxidized Configuration'''
    6069
    61 Create the oxidized user.
    62 
    63 {{{
    64 useradd -s /bin/bash -m oxidized
    65 sudo su - oxidized
    66 oxidized
     70Open oxidized main configuration file.
     71
     72{{{
     73su - oxidized
    6774nano .config/oxidized/config
    6875}}}
     
    180187'''Postfix Installation'''
    181188
    182 Postfix will be installed to have an email notification of configuration changes.
     189Postfix will be installed to have an email notification of configuration changes. Run the following commands as root user.
    183190
    184191{{{
     
    186193}}}
    187194
    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.
     195Select ''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
     199Put '''oxidized.learn.com''' for ''System mail name'' and proceed.
     200
     201[[Image(mail name.png, 1700px)]][[BR]]
    191202
    192203'''Gmail Configuration'''
     
    210221}}}
    211222
    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.
     223Go 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. 
    213224
    214225{{{
     
    222233smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
    223234
     235smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
     236myhostname = oxidized
    224237alias_maps = hash:/etc/aliases
    225238alias_database = hash:/etc/aliases
    226239myorigin = /etc/mailname
     240mydestination = $myhostname, oxidized.learn.com, oxidized, localhost.localdomain, localhost
    227241relayhost = [smtp.gmail.com]:587
    228242mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
     
    251265postmap /etc/postfix/sasl_passwd
    252266systemctl restart postfix
    253 }}}
    254 
    255 Check email sending. Replace '''oxidizedfor''' accordingly.
     267apt install mailutils
     268}}}
     269
     270Check email sending. Replace '''oxidizedfor''' accordingly. Check the gmail inbox (also the spam folder). You may have to refresh your gmail inbox several times.
    256271{{{
    257272echo "Test Postfix Gmail SMTP Relay" | mail -s "Postfix Gmail SMTP Relay" oxidizedfor@gmail.com
    258273}}}
     274
    259275An email will be sent to the Gmail account after a saved configuration change, when Oxidized get refreshed.
    260276