Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firewal and SSH #66

Open
KunalSin9h opened this issue Aug 20, 2024 · 0 comments
Open

Firewal and SSH #66

KunalSin9h opened this issue Aug 20, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@KunalSin9h
Copy link
Owner

A firewall is a network security device or software that monitors and controls incoming and outgoing network traffic based on predetermined security rules. It acts as a barrier between trusted internal networks and untrusted external networks, such as the internet.

To secure a firewall in Ubuntu, you can use the built-in Uncomplicated Firewall (UFW), which is a user-friendly front-end for iptables. Here's a basic guide to set up and secure UFW on Ubuntu:

  1. Install UFW if not already installed:
sudo apt install ufw
  1. Enable UFW:
sudo ufw enable
  1. Set default policies:
sudo ufw default deny incoming
sudo ufw default allow outgoing
  1. Allow necessary services (example for SSH):
sudo ufw allow ssh
  1. Allow other needed services (examples):
sudo ufw allow 80/tcp  # HTTP
sudo ufw allow 443/tcp  # HTTPS
  1. Check the status of your firewall:
sudo ufw status verbose
  1. To further enhance security:

    • Limit SSH connections:
      sudo ufw limit ssh
      
    • Use specific IP addresses or ranges for certain services:
      sudo ufw allow from 192.168.1.0/24 to any port 22
      
  2. Regularly update your system:

sudo apt update && sudo apt upgrade
  1. Monitor logs for unusual activity:
sudo tail -f /var/log/ufw.log

Would you like me to explain or break down any part of this setup process?

@KunalSin9h KunalSin9h added the enhancement New feature or request label Aug 20, 2024
@KunalSin9h KunalSin9h self-assigned this Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant