There weren't any VLC skins that satisfied me so I created one based on an existing one. Fell free to use it and make modifications as you feel fit.
Download VLC Skin - Spaceship Air Carrier
Wednesday, May 9, 2018
Plex Media Server
Implementation: We are using local storage for our Plex media. Should we ever want to have a separate NAS, consider other options such as FreeNAS.
Dependencies
Settings > Server > Network
Reference: https://support.plex.tv/articles/200430283-network/
Disabled – Don’t allow Plex apps to connect securely and instead force all communication over regular HTTP.
A comma-separated list of URLs (either HTTP or HTTPS), which will be published to plex.tv for server discovery. This can be very useful in a few cases: if you’re using a VPN to get back home, if you’re using a reverse proxy in front of the media server, or if your networking configuration is otherwise unique. For instance, if you have your own custom domain with subdomain, you might add:
http://plex.ssis.edu.vn:32400
List of IP addresses and networks that are allowed without auth
The list of IP addresses or networks that can connect to Plex Media Server without authorization. Enter a comma-separated (no spaces or tabs!) list of IP addresses or specify a range using IP/netmask entries. This can be useful if you have an old, legacy, unsupported app (such as LG’s MediaLink or SmartShare apps) that you wish to use.
172.20.0.0/16,172.16.0.0/16,172.17.0.0/16,172.18.0.0/16
Ubuntu OS Installation
Install Ubuntu Server 18.04 with only OpenSSH packagesDependencies
sudo su -Samba Configuration
apt-get update; apt-get upgrade -y
apt-get install curl samba cifs-utils
mkdir /plex
chmod 777 /plex
vi /etc/samba/smb.conf
workgroup = ssis.edu.vn security = user winds support = yes
dns proxy = no
name resolve order = lmhost host winds bcast
... add to end of file ...
[PLEX Media]
comment = PLEX Media
path = /plex
browseable = yes
read only = no
guest ok = yes
Plex Media Server Installation
Download from https://www.plex.tv/downloads/ anddpkg -i plexmediaserver_<version>.deb
systemctl enable plexmediaserver
systemctl start plexmediaserver
Start/Stop/Status Services
service plexmediaserver start
service plexmediaserver stop
service plexmediaserver status
Access Plex
On one terminalssh user@srvr-uplex.ssis.edu.vn -L 8888:localhost:32400
Then use web browser: http://localhost:8888/web
Network Settings
We disabled https for performance and there is no need for a secure connection since we only allow our internal network to access Plex.Settings > Server > Network
Reference: https://support.plex.tv/articles/200430283-network/
Secure connections
Choose how your Plex Media Server handles secure connections.Disabled – Don’t allow Plex apps to connect securely and instead force all communication over regular HTTP.
Advanced Settings
Custom server access URLsA comma-separated list of URLs (either HTTP or HTTPS), which will be published to plex.tv for server discovery. This can be very useful in a few cases: if you’re using a VPN to get back home, if you’re using a reverse proxy in front of the media server, or if your networking configuration is otherwise unique. For instance, if you have your own custom domain with subdomain, you might add:
http://plex.ssis.edu.vn:32400
List of IP addresses and networks that are allowed without auth
The list of IP addresses or networks that can connect to Plex Media Server without authorization. Enter a comma-separated (no spaces or tabs!) list of IP addresses or specify a range using IP/netmask entries. This can be useful if you have an old, legacy, unsupported app (such as LG’s MediaLink or SmartShare apps) that you wish to use.
172.20.0.0/16,172.16.0.0/16,172.17.0.0/16,172.18.0.0/16
Thursday, February 22, 2018
OpenVAS Installation
How to Install OpenVAS Vulnerability Scanner on Ubuntu 16.04
Introduction
OpenVAS is an open source suite that can be used for vulnerability scanning and vulnerability management. It stands for Open Vulnerability Assessment System. OpenVAS is an excellent alternative to commercial security scanners such as Nessus, QualysGuard, etc. OpenVAS is divided into three parts: OpenVAS Scanner, OpenVAS Manager, and OpenVAS CLI.
In this tutorial, I will explain how to install OpenVAS Vulnerability Scanner on Ubuntu 16.04.
Prerequisites
- A newly deployed Ubuntu 16.04 server instance.
- A non-root user with sudo privileges setup on your server [sysad]
- A static IP address of 172.23.11.101 configured on [srvr-uopenvas.ssis.edu.vn].
- The rsync package must be installed
Step 1: Update the system
First, update your system to the latest stable version by running the following commands:
sudo apt-get update -y
sudo apt-get upgrade -y
sudo reboot
Step 2: Install required dependencies
Before installing OpenVAS, you will need to install its required dependencies. To install them, run the following command:
sudo apt-get install python-software-properties
Next, you will also need to install SQLite for OpenVAS manager:
sudo apt-get install sqlite3
Step 3: Install OpenVAS
By default, the OpenVAS package is not available in the Ubuntu 16.04 repository, so you will need to add OpenVAS PPA to your system's repository list.
Add the OpenVAS PPA.
sudo add-apt-repository ppa:mrazavi/openvas
Update the repository.
sudo apt-get update
Finally, install OpenVAS.
sudo apt-get install openvas
Once OpenVAS has finished installing, start the OpenVAS service with the following commands:
sudo systemctl start openvas-scanner
sudo systemctl start openvas-manager
sudo systemctl start openvas-gsa
sudo systemctl enable openvas-scanner
sudo systemctl enable openvas-manager
sudo systemctl enable openvas-gsa
Step 4: Allow OpenVAS through the system firewall
By default, OpenVAS runs on port
443, so you will need to allow this port through the UFW firewall.sudo ufw allow https
Step 5: Access OpenVAS web interface
Before accessing OpenVAS, you will need to update its vulnerability database. [You can do the update feed from the administration tab portion of the GUI]
sudo openvas-nvt-sync
Once the database is up-to-date, open your web browser and type the URL
https://172.23.11.101. On the login page, provide the default username(admin) and password (admin). After logging in, you will be presented with the OpenVAS dashboard.
If you want to change the admin user's password from command line, run the following command:
sudo openvasmd --user=admin --new-password=<new-password>
Congratulations! You have successfully installed OpenVAS on your Ubuntu 16.04 server.
Step 6: Creating Super Admin Users (DANGEROUS but necessary!)
service openvas-scanner stop
openvasmd --create-user=<username> --role="Super Admin"
openvasmd --user=<username> --new-password=<password>
service openvas-scanner start
NVT, CVE, CPE List
In order to update the NVT, CVE and CPE database listing, you need to have the SCAP feed updated. You can perform this from the GUI or
sudo openvas-scapdata-sync
503 - Service temporarily down
The issue started when i trying to figure out why scan result isn't working for me. I accidentally updated the cert and everything just go down hill from there. Hence, the only way is to figure out what happen. And the following solution seems to work for me. I also had to recreate the admin user.
openvas-mkcert-client -n om -iopenvas-nvt-sync --wgetservice openvas-scanner stop; service openvas-manager stop;openvassdrm /var/lib/openvas/mgr/tasks.dbopenvasmd --progress --rebuild -vopenvasmd --create-user=admin --role=Admin openvasmd --user=admin --new-password=adminservice openvas-scanner start; service openvas-manager start;
What this does is to remove ALL your task. And rebuild it again. It seems that somehow when we refresh the cert, all the task that bind with the old cert can't seems to perform a handshake with the new cert that i have generated. Hence, removing everything and redo it again seems to solve this problem.
Thursday, January 25, 2018
RSS Reader Using HTML and Javascript
File: rssGet.php
<?php//get the q parameter from URL
$q=$_GET["q"];
//find out which feed was selected
if($q=="MS") {
$xml=("https://announce.ssis.edu.vn/?call_custom_simple_rss=1&csrp_posts_per_page=3&csrp_orderby=date&csrp_order=DESC&
csrp_cat=1");
} elseif($q=="HS") {
$xml=("https://announce.ssis.edu.vn/?call_custom_simple_rss=1&csrp_posts_per_page=3&csrp_orderby=date&csrp_order=DESC&
csrp_cat=4");
}
$xmlDoc = new DOMDocument();
$xmlDoc->load($xml);
//get elements from "<channel>"
$channel=$xmlDoc->getElementsByTagName('channel')->item(0);
$channel_title = $channel->getElementsByTagName('title')
->item(0)->childNodes->item(0)->nodeValue;
$channel_link = $channel->getElementsByTagName('link')
->item(0)->childNodes->item(0)->nodeValue;
$channel_desc = $channel->getElementsByTagName('description')
->item(0)->childNodes->item(0)->nodeValue;
//output elements from "<channel>"
//echo("<p><a href='" . $channel_link
// . "'>" . $channel_title . "</a>");
//echo("<br>");
//echo($channel_desc . "</p>");
//get and output "<item>" elements
$x=$xmlDoc->getElementsByTagName('item');
for ($i=0; $i<=2; $i++) {
$item_title=$x->item($i)->getElementsByTagName('title')
->item(0)->childNodes->item(0)->nodeValue;
$item_link=$x->item($i)->getElementsByTagName('link')
->item(0)->childNodes->item(0)->nodeValue;
$item_desc=$x->item($i)->getElementsByTagName('description')
->item(0)->childNodes->item(0)->nodeValue;
echo ("<a href='" . $item_link
. "'>" . $item_title . "</a>");
echo ("<br>");
echo ($item_desc);
}
?>
File: rssShow.php
<html>
<head>
<style>
body {
font-family: arial;
}
a {
text-decoration: none;
text-size: x-small;
color: #333;
}
td {
padding: 10px;
}
</style>
</head>
<body>
<table><tr>
<th><a href="https://announce.ssis.edu.vn/middle-school"><font color="#FF5733">Middle School</font></a></th>
<th><a href="https://announce.ssis.edu.vn/high-school"><font color="#FFC300">High School</font></a></th>
</tr><tr>
<td style="border-right: 3px solid orange;">
<div id="rssOutputLeft">RSS-feed for MS ...</div>
</td><td>
<div id="rssOutputRight">RSS-feed for HS ...</div>
</td>
</tr></table>
<script>
function showRSS(str,id) {
if (str.length==0) {
document.getElementById(id).innerHTML="";
return;
}
if (window.XMLHttpRequest) {
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
} else { // code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function() {
if (this.readyState==4 && this.status==200) {
document.getElementById(id).innerHTML=this.responseText;
}
}
xmlhttp.open("GET","rssGet.php?q="+str,true);
xmlhttp.send();
}
showRSS("MS","rssOutputLeft");
showRSS("HS","rssOutputRight");
</script>
</body>
</html>
iFrame option
For those websites that will only take a simple html, provide them with an iframe<iframe src="https://announce.ssis.edu.vn/rssShow.php" width="100%" height="100%" frameborder="0"></iframe>
Tuesday, December 5, 2017
SD Card mounts read-only in Linux
The title might be misleading since my setup is using Linux Mint 18.3 but I have seen all kinds of posting related to this problem across Linux forums. I have tried all kinds of remedies suggested online and it seems to be a hit or miss and cant seem to narrow it down. Windows does not have any of these symptoms and can heal even should you forget to eject properly.
I have tried all the obvious ones such as changing permission on the filesystem to 777 and removing it as root or sudo. I had one success with this method then it went back every time I eject the SD card, use it in a speaker player then try to access it again on the computer.
Tried the fsck and did work one time but I am very careful prior to removing the card by ejecting it [umount].
Gparted didn't work. But if I've continued to try, I think one of these days it would have worked. Rebooted so many times that I felt like I was using Windows Vista.
The dd command didn't seem to work at all
I have noticed one time where my SD card had residual trash on the card .Trash-1000; however, nothing can remove it to include root. Then found out that you have to delete the user's Trash then umount and remount. This worked once then failed again.
A different scenario happened to where I plug in then eject then insert again then eventually it worked. From Nemo file manager is whether or not I had the delete option which indicated that the SD card is now in read-write mode.
I have tried umounting then remount with rw options:
I have tried all the obvious ones such as changing permission on the filesystem to 777 and removing it as root or sudo. I had one success with this method then it went back every time I eject the SD card, use it in a speaker player then try to access it again on the computer.
Tried the fsck and did work one time but I am very careful prior to removing the card by ejecting it [umount].
fsck -a /dev/sdb
Gparted didn't work. But if I've continued to try, I think one of these days it would have worked. Rebooted so many times that I felt like I was using Windows Vista.
The dd command didn't seem to work at all
dd if=/dev/zero of=/dev/sdb bs=1M count=10
I have noticed one time where my SD card had residual trash on the card .Trash-1000; however, nothing can remove it to include root. Then found out that you have to delete the user's Trash then umount and remount. This worked once then failed again.
rm -rf ~/.local/share/Trash/*
A different scenario happened to where I plug in then eject then insert again then eventually it worked. From Nemo file manager is whether or not I had the delete option which indicated that the SD card is now in read-write mode.
I have tried umounting then remount with rw options:
sudo fdisk -lor
sudo mount -t vfat -o rw /dev/sdb1 /mnt
sudo mount -o remount,rw /dev/sdb1 /media/username/usbname
Finally I really think that by adding myself and the root into the disk group worked.
sudo usermod -G disk --append username
sudo usermod -G disk --append root
