Search This Blog

Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Tuesday, June 6, 2023

Ubuntu Port Firewall uwf - not via iptables

 step 1: apt install ufw

step 2: ufw enable

step 3:   sudo nano /etc/default/ufw

          #enable ipv6=yes

step 4: Added default deny of incoming and allow outgoing

   sudo ufw default deny incoming

   sudo ufw default allow outgoing


#. to see the list   

sudo ufw app list


step 5: #. Allow open ssh for all your login and other operations

sudo ufw allow OpenSSH

   sudo ufw allow ssh

   sudo ufw allow 22

   sudo ufw show added

   sudo ufw enable


step 6: #. Allow default web ports and custom ports

   sudo ufw allow http

   sudo ufw allow https

   sudo ufw allow 8099

   sudo ufw allow 88


 

#. To see the port list

   sudo ufw status verbose


#. To deny the ports

   sudo ufw deny <port>


Thank You

https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-with-ufw-on-ubuntu-18-04



Thursday, June 1, 2023

Linux Ubuntu - SSH command to copy server to local or vice versa

 Copy file to Server to Local

    scp -P <port> <localfile path> <server user>@ip:<remote user home path>

    ex: > scp -P 22 mq/target/test.jar drvijay@192.2.2.2:/home/drvijay


Connect server : 

        ssh -p <port> <server user>@<IP>
        ssh -p 22 drvijay@182.2.2.2

Copy file from Server to Local
 





Note: ssh -p <port> small case for port option
          scp -P <port> upper -P for port specify.




Wednesday, May 31, 2023

Ms Sql server problem with linux python django app/settings.py

 From Database {section}


'driver': 'SQL Server Native Client 11.0',


To         

    'driver': 'ODBC Driver 17 for SQL Server'



Linux Ubuntu - See Running process with port number and details for that service

To see the pid details of running process

step 1.

lsof -i TCP:<port number>


lsof -i TCP:99


step 2

ps -ef | grep <pid>

ps -ef | grep 39100


step 3

kill -9 <pid>

Tuesday, October 26, 2021

Ubuntu Linux - Connect Postgresql from Psql and also PGadmin Remotely

 Step 1 :

> sudo su

> vi /etc/postgresql/10/main/postgresql.conf

#listen_addresses = 'localhost'
to 
listen_addresses = '*'

>vi /etc/postgresql/10/main/pg_hba.conf
# IPv4 local connections:
host all all 127.0.0.1/32 md5

to
host all all 0.0.0.0/0 md5


>sudo ufw allow 5432/tcp
>sudo systemctl restart postgresql


>psql -h localhost -d databasename -U userrolename
...enterpasswordfor-userrolename






Monday, July 19, 2021

Ubuntu KAZAM Screencast Recorder Audio Problem - FIX

1. Install Kazam 

    sudo apt install kazam

 2. modify this file:

/usr/lib/python3/dist-packages/kazam/pulseaudio/pulseaudio.py

and replace

time.clock()

with

time.perf_counter()
OR SIMPLE CLI COMMAND
sudo sed "s/time.clock()/time.perf_counter()/g" -i /usr/lib/python3/dist-packages/kazam/pulseaudio/pulseaudio.py
3. Open Kazam, Go to File -> Preferences. General
    Speakers -> SELECT from the list like 
                   Monitor of Built-in Audio ...



ENJOY


Sunday, July 5, 2020

MySQL - Linux Ubuntu Environemnt - which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

please see one of the step will work

Step-1
In your mysql benchmark

SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));

Restart your mysql service.
> service mysql restart

OR

Step-2

In Linux Terminal > sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf Go to last line and add > sql_mode = "" Restart mysql server.
> service mysql restart

Wednesday, June 24, 2020

Ubuntu Linux - Gnome Disk Boot Uninstall - Asking new user profile at booting 52MB new Loop disk

sudo apt-get remove gnome-disk-utility sudo apt-get remove --auto-remove gnome-disk-utility sudo apt-get purge gnome-disk-utility sudo apt-get purge --auto-remove gnome-disk-utility sudo apt update

Tuesday, June 23, 2020

Connect Watchgaurd VPN in linux ubuntu 20.04

1. Go to Pritunl https://client.pritunl.com/
2. Scroll to bottom, Select your linux OS, for ex: Ubuntu 20.04
3. Copy and paste the steps in your terminal
4. Windows Key in your keyboard, type pritunl, Open Pritunl GUI

5. Go to windows machine which watchgaurd is already installed.
     “%Appdata%\Watchguard\Mobile VPN\
6. Copy the following files to your linux machine for ex: /home/drvijay/watchgaurd
     client.ovpn
     ca.crt
    client.crt
    client.pem

7. Now in pritunl -> click import profile -> select the client.ovpn
8. Select connect and Enter your user/pwd from the top left settings









-ENJOY
 

Hit Counter


View My Stats