"exemples de script iptables" Code Answer's

You're definitely familiar with the best coding language Whatever that developers use to develop their projects and they get all their queries like "exemples de script iptables" answered properly. Developers are finding an appropriate answer about exemples de script iptables related to the Whatever coding language. By visiting this online portal developers get answers concerning Whatever codes question like exemples de script iptables. Enter your desired code related query in the search bar and get every piece of information about Whatever code related question on exemples de script iptables. 

exemples de script iptables

By Fierce FlyFierce Fly on May 14, 2021
more /etc/init.d/MonFirewall

#!/bin/bash
echo Setting firewall rules...
#
# config de base
#

# Vider les tables actuelles
iptables -t filter -F
iptables -t filter -X
echo - Vidage : [OK]

# Autoriser SSH
iptables -t filter -A INPUT -p tcp --dport 22 -j ACCEPT
echo - Autoriser SSH : [OK]

# Ne pas casser les connexions établies
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
echo - Ne pas casser les connexions établies : [OK]

# Interdire toute connexion entrante
iptables -t filter -P INPUT DROP
iptables -t filter -P FORWARD DROP
echo - Interdire toute connexion entrante : [OK]

# Interdire toute connexion sortante
iptables -t filter -P OUTPUT DROP
echo - Interdire toute connexion sortante : [OK]

# Autoriser les requetes DNS, FTP, HTTP, NTP etc. SORTANTES
iptables -t filter -A OUTPUT -p tcp --dport 20 -j ACCEPT
iptables -t filter -A OUTPUT -p tcp --dport 21 -j ACCEPT
iptables -t filter -A OUTPUT -p tcp --dport 80 -j ACCEPT
iptables -t filter -A OUTPUT -p udp --dport 53 -j ACCEPT
iptables -t filter -A OUTPUT -p tcp --dport 53 -j ACCEPT
iptables -t filter -A OUTPUT -p udp --dport 123 -j ACCEPT
echo - Autoriser les requêtes DNS, FTP, HTTP, NTP : [OK]

# Autoriser loopback
iptables -t filter -A INPUT -i lo -j ACCEPT
iptables -t filter -A OUTPUT -o lo -j ACCEPT
echo - Autoriser loopback : [OK]

# Autoriser ping
iptables -t filter -A INPUT -p icmp -j ACCEPT
iptables -t filter -A OUTPUT -p icmp -j ACCEPT
echo - Autoriser ping : [OK]

# Gestion des connexions ENTRANTES autorisées
#
# iptables -t filter -A INPUT -p  --dport -j ACCEPT

# Autoriser HTTP, HTTPS
iptables -t filter -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -t filter -A INPUT -p tcp --dport 443 -j ACCEPT
echo - Autoriser serveur Apache : [OK]

# Autoriser FTP
modprobe ip_conntrack
modprobe ip_conntrack_ftp
iptables -t filter -A INPUT -p tcp --dport 20 -j ACCEPT
iptables -t filter -A INPUT -p tcp --dport 21 -j ACCEPT
iptables -t filter -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
echo - Autoriser serveur FTP : [OK]

# Autoriser Mail
iptables -t filter -A INPUT -p tcp --dport 25 -j ACCEPT
iptables -t filter -A INPUT -p tcp --dport 110 -j ACCEPT
iptables -t filter -A INPUT -p tcp --dport 143 -j ACCEPT
iptables -t filter -A OUTPUT -p tcp --dport 25 -j ACCEPT
iptables -t filter -A OUTPUT -p tcp --dport 110 -j ACCEPT
iptables -t filter -A OUTPUT -p tcp --dport 143 -j ACCEPT
echo - Autoriser serveur Mail : [OK]

# Limiter le Syn-Flood à 1 seconde
iptables -A FORWARD -p tcp --syn -m limit --limit 1/second -j ACCEPT
iptables -A FORWARD -p udp -m limit --limit 1/second -j ACCEPT
echo - Limiter le Syn-Flood : [OK]

# IP à blacklister
# iptables -A INPUT -s ADRESSE_IP -j DROP
echo - Mise à jour des IP blacklistées : [OK]

# Bloquer le Spoofing
iptables -N SPOOFED
iptables -A SPOOFED -s 127.0.0.0/8 -j DROP
iptables -A SPOOFED -s 169.254.0.0/12 -j DROP
iptables -A SPOOFED -s 172.16.0.0/12 -j DROP
iptables -A SPOOFED -s 192.168.0.0/16 -j DROP
iptables -A SPOOFED -s 10.0.0.0/8 -j DROP
echo - Bloquer le Spoofing : [OK]

echo Firewall mis a jour avec succès !

Source: community.jaguar-network.com

Add Comment

0

All those coders who are working on the Whatever based application and are stuck on exemples de script iptables can get a collection of related answers to their query. Programmers need to enter their query on exemples de script iptables related to Whatever code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about exemples de script iptables for the programmers working on Whatever code while coding their module. Coders are also allowed to rectify already present answers of exemples de script iptables while working on the Whatever language code. Developers can add up suggestions if they deem fit any other answer relating to "exemples de script iptables". Visit this developer's friendly online web community, CodeProZone, and get your queries like exemples de script iptables resolved professionally and stay updated to the latest Whatever updates. 

Whatever answers related to "exemples de script iptables"

View All Whatever queries

Whatever queries related to "exemples de script iptables"

exemples de script iptables limit number connections iptables rendre iptables passées en cli persistentes iptables allow sftp file iptables redirect traffic to another ip iptables allow all outgoing iptables localhost redirection iptables allow port from anywhere what is Razor Script disable script in unity godot first person controller script button script visual studio 2019 google script last row sprite unity script how to know username apps script nmap -Pn --script vuln ipaddr minecraft server start batch script Refused to execute inline script because it violates the following Content Security Policy directive How to make a script that spawns parts what to do if script fails Smooth Camera script roblox studiio Head/Waist follow Mouse/Camera script js jquery include external script terraform script to create s3 bucket how to write a script to render in iframe init script app script for google forms to email app hypertext preprocessor script Account age blacklist script for roblox script dir bash travis allow_failures script Difference between Test case and Test script? load test script locust roblox studio change size script How to make a cash giving script execute a menu command from script unity how to make a death animation script Brick spawner script for roblox studio find duplicates apps script html5 script external How to make a bubble chat script part spawner script for roblox studio dontdestroyonload script zsh print each line of script btn script t rex how to call a void from difrent script unity fps camera rotation script obs studio use script npm run build npm ERR! Missing script: "build" for firebase unity change button onclick in script test case vs test script rest assured script how to get the script of fontawesome how to make a creator joined script TypeError: Cannot read property 'RecId' of undefined app script script generate tracking number ups by post how to make a 24 minute day night script npm ERR! missing script: build:dev bash script cheat sheet run python script in kubernetes how to make a owner joined script quizlet In converting an entrepreneurial business script into an enterprise value chain, the financing process of the value chain is usually made up of two different scenes what will you do if test script fails long query running script teste google script photoshop script create prompt How to amke a Gamepass script in roblox studio 2020 half life bhop script nickaname and tag unity and pun2 script bs4 get text from script tag how to run a script in crontab every day mikrotik script check ip public activate pane apple script test scenario, test case and test script boot up batch script pop cat script how to make a player join / left script windows batch script to run application in background can we script test case without object repository photoshop script open file dialog how to save script in another file How to make a rain script photoshop script confirmation prompt bash script in array slow query script app script comparison existing data hack discord script script and style for admin menu How to amke a death animation script keynote Present Keynote slideshow: display script of similar information that only you can see: photoshop script: save as jpg bash script exec blocks Slow walk script dockerfile chmod: changing permissions of './script.sh': Operation not permitted unity 2d platformer movement script rigidbody bash script speichern from speed test in influxdb batch script delete files older than 30 days total time taken by script how to send mail in pdf format in netsuite using script roblox kick player script script deferred how to get the player character roblox script script to get pem expiration date unity player move script terraform script to launch aws instance launch regex to filter login script injection npm run script with arguments glances intsallation script autoit check if autoit script is running detect script in pdf apps script convert docx to doc entity framework generate script google app script when user uses on edit protected range r library from conda environment batch job bash script first person movement script for godot

Browse Other Code Languages

CodeProZone