Making Captive Portal on Raspberry pi 4 using nodogsplash - raspberry-pi4

I am trying to make a captive portal wifi network using my raspberry pi 4 after doing this steps :
sudo apt update
sudo apt upgrade
sudo apt install git libmicrohttpd-dev
cd ~
git clone https://github.com/nodogsplash/nodogsplash.git
cd ~/nodogsplash
make
sudo make install
editing nodogsplash.conf
sudo nano /etc/nodogsplash/nodogsplash.conf
to
GatewayInterface wlan0
GatewayAddress 192.168.220.1
MaxClients 250
AuthIdleTimeout 480
and then run the nodogsplash i got:
pi#raspberrypi:~/nodogsplash $ sudo nodogsplash
[5][Mon Jan 13 17:33:54 2020][14375](src/main.c:472) Starting as daemon, forking to background
[5][Mon Jan 13 17:33:54 2020][14376](src/main.c:267) Detected gateway wlan0 at 192.168.178.1 (dc:a6:32:54:ef:c1)
[3][Mon Jan 13 17:33:54 2020][14376](src/main.c:278) Could not create web server: No such file or directory

I had the same problem today. It looks like there is a bug in the newest versions of nodogsplash.
The version from the 29th of December works fine for me.
You can simply checkout this version.
...
git clone https://github.com/nodogsplash/nodogsplash.git
cd ~/nodogsplash
git checkout 41c8752f6217886ee4a3f048578d867cdcc04cd6
make
...

I have no idea why, but if you increase the debug level to 2 or 3, then it works:
sudo nodogsplash -d2
Ref: https://github.com/nodogsplash/nodogsplash/issues/498

Related

Installing OpenStack on centos Stream 9 using PackStack, networking Problem

I have installed Openstack using Packstack on centos stream 8 but when i want to use Centos Stream 9 for Openstack ( using packstack ), it through an Error that
OpenStack networking currently does not work on systems that have the
Network Manager service enabled.
But as you may know, network-scripts/ifcfg ... are not Available on Centos 9 anymore!
in case of Centos Stream 8, I have manually disabled and Stoped Network Manager and instead i have been using systemctl enable network to enable the Network availability after reboot or during the installation!
But this is not available for Centos stream 9!
Anyone can give me some insights on how to fix this issue!
Any replacement for Network Manager like what we do on centos stream 8 ( using network ) but for centos Stream 9?
dnf install -y centos-release-openstack-yoga &&
dnf install -y openstack-packstack
packstack --gen-answer-file /root/openstack-answer.txt
Thanks
best regards
This worked for me:
Install centos-release-openstack-yoga and openstack-packstack:
dnf install -y centos-release-openstack-yoga
dnf install -y openstack-packstack
Install network-scripts:
dnf update -y
dnf install -y network-scripts
Disable NetworkManager and enable network service:
systemctl disable NetworkManager
systemctl stop NetworkManager
systemctl enable network
systemctl start network
Install openstack:
packstack --allinone
Check ALL of your network interfaces are configured correctly. For me they weren't, because packstack simply ignored my second NIC and it didn't magically migrate from NetworkManager configuration:
ls -la /etc/sysconfig/network-scripts/ifcfg-*

how to install OpenStack on Ubuntu in 2022

On youtube there are many guides that show how to install openstack on ubuntu I have tried them and they seem not to work
For example with Devstack I fail every time the installation with .Stack.sh, with MicroStack I fail the initialization
I can't install OpenStack in any way!
could somebody help me?
I have installed openstack from various different ways but for me installing through Devstack is the easiest and the most convenient way to do it.
Let me share the installation steps that I use:
Firstly few prerequisites:
A fresh Ubuntu 20.04 installation (Ubuntu 18.04 Works)
8 GB RAM (4 GB RAM works)
4 vCPUs (2 vCPUs works)
Hard disk capacity of 20 GB (min 10 GB)
Step 1 : apt update -y && apt upgrade -y
Step 2: Create Stack user:
sudo adduser -s /bin/bash -d /opt/stack -m stack
echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
su - stack
Step 3:
git clone https://git.openstack.org/openstack-dev/devstack
cd devstack
Step 4: Create devstack configuration file
vim local.conf
Paste this:
[[local|localrc]]
# Password for KeyStone, Database, RabbitMQ and Service
ADMIN_PASSWORD=admin
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
# Host IP - get your Server/VM IP address from ip addr command
HOST_IP=0.0.0.0
Step 5: ./stack.sh
The setup will take about 10-15 minutes depending upon your system. Once installation is complete you can access the dashboard using https://your-ip/dashboard
Note: Incase the stack.sh fails make sure to use ./unstack and ./clean.sh before you use stack.sh again.

How to mount vmware shared folders in WSL2

I have a Mac, and install a Win10 VM by vmware fusion, the shared folders between Mac and Win10 VM use drive letter Z: or \vmware-host
And I mapped a network address \192.168.111.49\Builds to drive letter Y:
Then I install WSL2 in the Win10 VM, and linux subsystem Ubuntu 20.04 LTS
I want to mount all drive letter in Ubuntu, C: is automatically mount /mnt/c
And i use these cmd to mount Y:
sudo mkdir /mnt/y
sudo mount -t cifs -o username=xxx,password=xxxx,domain=xxx //192.168.111.49/Builds /mnt/y
It's OK
However, when I try mount Z:, it's not work
# from vmware official site
$ sudo vmhgfs-fuse -d .host:/ /mnt/z -o subtype=vmhgfs-fuse,allow_other
Segmentation fault (core dumped)
# try to use drvfs
$ sudo mount -t drvfs Z: /mnt/z
mount: /mnt/z: special device Z: does not exist.
<3>init: (457) ERROR: UtilCreateProcessAndWait:489: /bin/mount failed with status 0x2000
<3>init: (457) ERROR: MountPlan9:478: mount cache=mmap,rw,trans=fd,rfdno=3,wfdno=3,msize=65536,aname=drvfs;path=Z:;symlinkroot=/mnt/ failed 2
No such file or directory
# like network address
$ sudo mount -t cifs -o username=xxx,password=xxx //vmware-host/ /mnt/z
mount: /mnt/z: bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program.
And I check my open-vm-tools version
$ sudo apt-get upgrade open-vm-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
open-vm-tools is already the newest version (2:11.1.5-1~ubuntu20.04.2).
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
It's already newest.
Any help? Thanks.
I found the reason is I run cmd or powershell as administrator
If I don't use administator, the following mount is OK
sudo mount -t drvfs Z: /mnt/z

OpenVAS installation and running errors

I've installed Greenbone Security Assistant Version 9.0.1 (OpenVAS) by this instruction on my VirtualBox's Ubuntu 20.4.
sudo apt install postgresql
sudo add-apt-repository ppa:mrazavi/gvm
sudo apt install gvm
greenbone-nvt-sync
sudo greenbone-scapdata-sync
sudo greenbone-certdata-sync
Unfortunately, it does not works.
When I'm trying to create a task by Wizard, I have the task completed just in moment, with an empty log. And that's all.
I've tried three commands:
systemctl status ospd-openvas # scanner
systemctl status gvmd # manager
systemctl status gsad # web ui
Everything is okay, except ospd-openvas. The status is green and active, but there are some errors too:
Jul 20 15:00:27 alex-VirtualBox ospd-openvas[833]: OSPD - openvas:
ERROR: (ospd_openvas.daemon) Failed to create feed lock file
/var/run/ospd/feed-update.lock. [Errno 2] No such file or directory:
'/var/run/ospd/feed-update.lock'
From the error message it looks like the directory /var/run/ospd/ does not exist.
Create the directory and try to restart the service.
In ubuntu 20.04 /var/run points to /run which is a temporary file system. That means that if you create the directory /var/run/ospd manually, it will be gone after the next reboot. To fix it permanently (in case the missing directory is the issue), please refer to this post.
This may help some people with some of the issues I've been facing:
mkdir -p /var/run/ospd/
touch /var/run/ospd/feed-update.lock
chown gvm:gvm /var/run/ospd/feed-update.lock

Fresh install: httpd.service: Unit not found

Currently I'm trying to follow this guide:
https://marxtudor.com/how-to-install-wordpress-using-ssh-on-centos-vps/
I'm using Google Cloud Platform (free edition to test) and I've created a fresh CentOS 7 VM. The guide above are the first commands I fill in and I keep getting this error:
I've followed so many tutorials, created a new VM and all the time I bump into this error that it doesn't know the httpd command.. I even deleted the project and started all over, but still no luck.
[rsa-key-XXXXXX]$ sudo service httpd restart
Redirecting to /bin/systemctl restart httpd.service
Failed to restart httpd.service: Unit not found.
[rsa-key-XXXXXX]$ httpd -t
-bash: httpd: command not found
[rsa-key-XXXXXX]$
Could anyone please let me know what could be causing this ?
Thanks in advance!
I was also getting the same error, this is how i resolved my issue.
After logging to the machine:
Step 1: Become the root user.
command: sudo su
Step 2: Update Kernal
command: yum update -y
Step 3: Install Apache command: yum install
httpd -y
Step 4: Start Apache command: service httpd start
Step 5: Check Status of Service command: service httpd status
This should solve your problem. good luck
Do you want to install WordPress for your Compute Engine VM instance, using CentOS 7?
If this is the case, you may do so by setting up LAMP for your VM, as described here [1], and then download the WordPress release of your choice [2] and install it on your VM.
I understand that you have successfully set up a VM instance using Centos 7, is this correct? Assuming this, and as you may see from [1], for CentOS 7, these would be the commands to perform this installation:
1) Update and install Apache and PHP:
sudo yum check-update
sudo yum -y install httpd php
2) Start the Apache service:
sudo service httpd start
sudo chkconfig httpd on
3) Install, configure and start DB:
sudo yum -y install httpd mariadb-server php php-mysql
sudo systemctl start mariadb
4) Configure MySQL (set a password for the root user if you want):
sudo mysql_secure_installation
5) Restart Apache
sudo service httpd restart
Once MySQL is set up, you will have to create a database for your WordPress installation.
Following this procedure, you will have Apache, MySQL and PHP installed and running on your Compute Engine VM instance.
Then, you can download the WordPress release of your choice [2], unzip the file and install WordPress by visiting your IP address and the folder where WordPress was downloaded. For example, http://YOUR_PUBLIC_VM_IP_ADDRESS/wordpress.
You will be asked for a database name, the user and password. This will allow WordPress to create the wp-config.php file on your behalf and proceed with the installation.
At this point, you should have WordPress already installed on your Compute Engine VM instance using CentOS 7.
An easier way to install WordPress on Compute Engine VM instances, would be by using the Marketpĺace in the Cloud Platform Console. Go to your Products and Services menu > Marketplace, and search for "Wordpress". You will be presented with many different options to launch WordPress in a Compute Engine VM instance. Nevertheless, it seems that Debian is the deafult OS used for these options.
Links:
[1] https://cloud.google.com/community/tutorials/setting-up-lamp
[2] https://wordpress.org/download/
In my case, I resolved it by looking what actual package name had "httpd" in it.
yum search httpd
It returned httpd.x86_64
Also, later on, when doing sudo service httpd start, I received the notification that PolicyKit1 was needed. So, all up, that command installed the package:
yum install -y httpd.x86_64 polkit-qt.x86_64
service httpd start

Resources