<commit_before>#!/bin/sh

echo "Flushing current rules"
iptables -F

echo "Allowing related and established connections"
iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT

echo "Allowing ssh to connect freely"
iptables -A INPUT -p tcp --dport ssh -j ACCEPT

echo "Allowing webtraffic as some programs may use a webserver"
iptables -A INPUT -p tcp --dport 80 -j ACCEPT

echo "Disabling all remaining traffic"
iptables -A INPUT -j DROP
<commit_msg>Firewall will now support loopback device<commit_after>#!/bin/sh

echo "Stopping iptables-persistent service"
service iptables-persistent flush

echo "Flushing current rules"
iptables -F

echo "Allowing loopback devices to connect"
iptables -A INPUT -i lo -j ACCEPT

echo "Allowing related and established connections"
iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT

echo "Allowing ssh to connect freely"
iptables -A INPUT -p tcp --dport ssh -j ACCEPT

echo "Allowing webtraffic as some programs may use a webserver"
iptables -A INPUT -p tcp --dport 80 -j ACCEPT

echo "Disabling all remaining traffic"
iptables -A INPUT -j DROP

echo "---------------------------------------------------------"
echo "WARNING THIS SCRIPT DOES NOT MAKE THE SETTINGS PERSISTENT"
echo "TEST EVERYTHING WORKS THEN MAKE PERSISTENT"
echo "---------------------------------------------------------"

{'fraction_non_alphanumeric': 0.1486090775988287, 'fraction_numerical': 0.0029282576866764276, 'mean_word_length': 2.8945868945868947, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3651105', 'n_tokens_mistral': 423, 'n_tokens_neox': 410, 'n_words': 176}