Freitag, 5. November 2021

Buffalo Linkstation SSH Login Problems

In case you can't login via ssh try this 


ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 123.123.123.123

Donnerstag, 29. April 2021

Proxmox CIF Mount for Buffalo NAS Linkstation

 In case you can't mount your Buffalo NAS:

Make sure, your NAS is on SMB 2:

Run the program ACPCommander v1.5.6.0 to get SSH login to your buffalo

change /etc/init.d/smb.sh

from 

/usr/local/sbin/nas_configgen -c samba if [ $? -ne 0 ]; then echo "$0 configure fail" exit 1 fi

to

/usr/local/sbin/nas_configgen -c samba if [ $? -ne 0 ]; then echo "$0 configure fail" exit 1 fi /bin/sed -i '3i\\ min protocol = SMB2\\ max protocol = SMB2\\ ' /etc/samba/smb.conf

then reboot

at PVE:


pvesm add cifs NAS-04 --server IP_of_your_NAS --share backup --username backup --password <yourPasswordhere> --smbversion 2.0

Donnerstag, 1. April 2021

FreePBX 14 to 15 via CLI

 In case you have to update your FreePBX


yum upgrade -y fwconsole ma upgradeall fwconsole chown fwconsole reload reboot fwconsole ma downloadinstall versionupgrade fwconsole reload fwconsole versionupgrade --check fwconsole versionupgrade --upgrade fwconsole chown fwconsole reload reboot fwconsole ma upgradeall fwconsole chown fwconsole reload reboot

Freitag, 26. März 2021

Postfix

 Some hints according postfix and mySQL


Add Domain:

inside sql:

insert into domains (domain) values ('newdomain.tld');


Add User:

doveadm pw -s SHA512-CRYPT

inside sql:

insert into accounts (username, domain, password, quota, enabled, sendonly) values ('username', 'domain.d', 'String from Doveadm pw', 2048, true, false); 


Add Alias:

inside sql:

insert into aliases (source_username, source_domain, destination_username, destination_domain, enabled) values ('aliasname', 'domain.tdl', 'Target_User', 'domain.tld', true);


Refresh your dovecot with:

newaliases

Sonntag, 7. März 2021

List of AD User sort by when created

 In case you want to see your last created AD User

Run PowerShell as Admin

$DateCutOff = (Get-Date).AddDays(-30)


Get-ADUser -Filter * -Properties whenCreated | where {$_.whenCreated -gt $DateCufOff} | FT Name, whenCreated

Mittwoch, 4. November 2020

 Let's Encrypt on Exchange 2013

Preparation

Go to https://www.win-acme.com/ and download the latest release and unzip it to a directory of your choice.

Open on your firewall port 80

Make sure that on your IIS you have a default site on port 80

Execution

Open a CMD with Administrator privileges 

run: 

wacs.exe --target manual --host mail.yourdomain.com,autodiscover.yourdomain.com --certificatestore My --acl-fullcontrol "network service,administrators" --installation iis,script --installationsiteid 1 --script "./Scripts/ImportExchange.ps1" --scriptparameters "'{CertThumbprint}' 'IIS,SMTP,IMAP' 1 '{CacheFile}' '{CachePassword}' '{CertFriendlyName}'"

Close Port 80


That's it

Dienstag, 3. November 2020

Atlassian Confluence SSL with Let'sEncrypt Certificates

 Let's Encrypt und Atlassian Confluence

1. Install Certbot

sudo snap install core; sudo snap refresh core

sudo snap install --classic certbot

sudo ln -s /snap/bin/certbot /usr/bin/certbot

2. Tomcat modification

Add to server.xml

<Connector acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" enableLookups="false" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" port="8080" protocol="HTTP/1.1" redirectPort="8443" useBodyEncodingForURI="true"/>

This enables Tomcat to listen on Port 80.

Restart Tomcat

Open your firewall that Port 80 reaches your Confluence server.

3. Request your Certificate

certbot certonly --standalone -d confluence.yourdomain.com

4. Create P12 Certificate

openssl pkcs12 -export -out /tmp/confluence.p12 -in /etc/letsencrypt/live/confluence.yourdomain.com/fullchain.pem -inkey /etc/letsencrypt/live/confluence.yourdomain.com/privkey.pem -name tomcat

(Note your export Password - you need it later in step 6 and for your server.xml)

5. Prepare your Keystore

keytool -delete -alias tomcat -keystore <MY_KEYSTORE_FILENAME>

6. Import Let's Encrypt Certificate

 keytool -importkeystore -deststorepass '1234' -destkeypass '1234' -destkeystore /opt/atlassian/confluence/ConfluenceKeyStore.jks -srckeystore /tmp/confluence.p12 -srcstoretype PKCS12 -srcstorepass '1234' -alias tomcat

7. Clean Up

Delete entry added in step 2 from server.xml and ckeck if the path to your new keystore and password are correct.

Restart confluence

Close Port 80 on your Firewall