Firewall no Kubuntu não me deixa jogar quake live

Iniciado por Hqxriven, 23 de Março de 2010, 15:21

tópico anterior - próximo tópico

Hqxriven

Sem o firewall eu consigo mas com ele não funciona...

Citar#!/bin/sh
#
# copyright (c) the KMyFirewall developers 2001-2007
# Please report bugs to: Christian Hubinger <chubinegr@irrsinnig.org>
#
# This program is distributed under the terms of the GPL v2
#
# KMyFirewall v1.1.1
# This is an automatic generated file DO NOT EDIT
#
# Configuration created for My Local Computer [127.0.0.1]
#

startFirewall() {

echo -n "Starting iptables (created by KMyFirewall)...       "
if [ "$verbose" = "1" ]; then
echo -n "
Loading needed modules...          "
fi


$MOD ip_tables
$MOD ip_conntrack
$MOD ipt_LOG
$MOD ipt_limit
$MOD ipt_state
$MOD ip_conntrack_ftp
$MOD ip_conntrack_irc

$MOD iptable_filter
$MOD iptable_nat
$MOD iptable_mangle
if [ "$verbose" = "1" ]; then
echo "Done."
fi



#  Define all custom chains
if [ "$verbose" = "1" ]; then
echo -n "Create custom chains...       "
fi





if [ "$verbose" = "1" ]; then
echo "  Done."
fi



#  Rules:
if [ "$verbose" = "1" ]; then
echo "Settup Rules in Table FILTER:"
fi




#  Define Rules for Chain: INPUT
if [ "$verbose" = "1" ]; then
echo "Create Rules for Chain: INPUT"
fi

                   
$IPT -t filter -A INPUT --source 127.0.0.1 --in-interface lo -j ACCEPT  || { status="1"; echo " Setting up Rule: LOCALHOST FAILED! Clearing Rules!";  stopFirewall; exit 1; }

$IPT -t filter -A INPUT -p tcp --match multiport --destination-ports 6881,6882,6883,6884,6885,6886,6887,6888,6889 -j ACCEPT  || { status="1"; echo " Setting up Rule: Bittorrent_tcp FAILED! Clearing Rules!";  stopFirewall; exit 1; }

$IPT -t filter -A INPUT --match state --state RELATED,ESTABLISHED -j ACCEPT  || { status="1"; echo " Setting up Rule: CONNTRACK FAILED! Clearing Rules!";  stopFirewall; exit 1; }

$IPT -t filter -A INPUT -m limit --limit 5/second --limit-burst 5 -j LOG --log-prefix "KMF: " || { status="1"; echo " Setting up Rule: Chain: INPUT Drop Logging FAILED! Clearing Rules!";  stopFirewall; exit 1; }

$IPT -t filter -P INPUT DROP || { status="1"; echo " Setting up Rule: Chain: INPUT Default Target FAILED! Clearing Rules!";  stopFirewall; exit 1; }


#  Define Rules for Chain: OUTPUT
if [ "$verbose" = "1" ]; then
echo "Create Rules for Chain: OUTPUT"
fi

                   
$IPT -t filter -A OUTPUT --out-interface lo -j ACCEPT  || { status="1"; echo " Setting up Rule: LOCALHOST FAILED! Clearing Rules!";  stopFirewall; exit 1; }

$IPT -t filter -A OUTPUT -p tcp --match multiport --destination-ports 6881,6882,6883,6884,6885,6886,6887,6888,6889 -j ACCEPT  || { status="1"; echo " Setting up Rule: Bittorrent_tcp FAILED! Clearing Rules!";  stopFirewall; exit 1; }

$IPT -t filter -A OUTPUT -p udp --destination-port 53 -j ACCEPT  || { status="1"; echo " Setting up Rule: DNS_udp FAILED! Clearing Rules!";  stopFirewall; exit 1; }

$IPT -t filter -A OUTPUT -p tcp --destination-port 80 -j ACCEPT  || { status="1"; echo " Setting up Rule: HTTP_tcp FAILED! Clearing Rules!";  stopFirewall; exit 1; }

$IPT -t filter -A OUTPUT -p tcp --destination-port 443 -j ACCEPT  || { status="1"; echo " Setting up Rule: HTTPS_tcp FAILED! Clearing Rules!";  stopFirewall; exit 1; }

$IPT -t filter -A OUTPUT -p tcp --destination-port 88 -j ACCEPT  || { status="1"; echo " Setting up Rule: Kerberos_tcp FAILED! Clearing Rules!";  stopFirewall; exit 1; }

$IPT -t filter -A OUTPUT -p udp --destination-port 88 -j ACCEPT  || { status="1"; echo " Setting up Rule: Kerberos_udp FAILED! Clearing Rules!";  stopFirewall; exit 1; }

$IPT -t filter -A OUTPUT -m limit --limit 5/second --limit-burst 5 -j LOG --log-prefix "KMF: " || { status="1"; echo " Setting up Rule: Chain: OUTPUT Drop Logging FAILED! Clearing Rules!";  stopFirewall; exit 1; }

$IPT -t filter -P OUTPUT DROP || { status="1"; echo " Setting up Rule: Chain: OUTPUT Default Target FAILED! Clearing Rules!";  stopFirewall; exit 1; }


#  Define Rules for Chain: FORWARD
if [ "$verbose" = "1" ]; then
echo "Create Rules for Chain: FORWARD"
fi

                   
$IPT -t filter -P FORWARD ACCEPT || { status="1"; echo " Setting up Rule: Chain: FORWARD Default Target FAILED! Clearing Rules!";  stopFirewall; exit 1; }


if [ "$verbose" = "1" ]; then
echo "Settup Rules in Table NAT:"
fi




#  Define Rules for Chain: OUTPUT
if [ "$verbose" = "1" ]; then
echo "Create Rules for Chain: OUTPUT"
fi

                   
$IPT -t nat -P OUTPUT ACCEPT || { status="1"; echo " Setting up Rule: Chain: OUTPUT Default Target FAILED! Clearing Rules!";  stopFirewall; exit 1; }


#  Define Rules for Chain: PREROUTING
if [ "$verbose" = "1" ]; then
echo "Create Rules for Chain: PREROUTING"
fi

                   
$IPT -t nat -P PREROUTING ACCEPT || { status="1"; echo " Setting up Rule: Chain: PREROUTING Default Target FAILED! Clearing Rules!";  stopFirewall; exit 1; }


#  Define Rules for Chain: POSTROUTING
if [ "$verbose" = "1" ]; then
echo "Create Rules for Chain: POSTROUTING"
fi

                   
$IPT -t nat -A POSTROUTING -j MASQUERADE  || { status="1"; echo " Setting up Rule: NAT_RULE FAILED! Clearing Rules!";  stopFirewall; exit 1; }

$IPT -t nat -P POSTROUTING ACCEPT || { status="1"; echo " Setting up Rule: Chain: POSTROUTING Default Target FAILED! Clearing Rules!";  stopFirewall; exit 1; }


if [ "$verbose" = "1" ]; then
echo "Settup Rules in Table MANGLE:"
fi




#  Define Rules for Chain: INPUT
if [ "$verbose" = "1" ]; then
echo "Create Rules for Chain: INPUT"
fi

                   
$IPT -t mangle -P INPUT ACCEPT || { status="1"; echo " Setting up Rule: Chain: INPUT Default Target FAILED! Clearing Rules!";  stopFirewall; exit 1; }


#  Define Rules for Chain: OUTPUT
if [ "$verbose" = "1" ]; then
echo "Create Rules for Chain: OUTPUT"
fi

                   
$IPT -t mangle -P OUTPUT ACCEPT || { status="1"; echo " Setting up Rule: Chain: OUTPUT Default Target FAILED! Clearing Rules!";  stopFirewall; exit 1; }


#  Define Rules for Chain: FORWARD
if [ "$verbose" = "1" ]; then
echo "Create Rules for Chain: FORWARD"
fi

                   
$IPT -t mangle -P FORWARD ACCEPT || { status="1"; echo " Setting up Rule: Chain: FORWARD Default Target FAILED! Clearing Rules!";  stopFirewall; exit 1; }


#  Define Rules for Chain: PREROUTING
if [ "$verbose" = "1" ]; then
echo "Create Rules for Chain: PREROUTING"
fi

                   
$IPT -t mangle -P PREROUTING ACCEPT || { status="1"; echo " Setting up Rule: Chain: PREROUTING Default Target FAILED! Clearing Rules!";  stopFirewall; exit 1; }


#  Define Rules for Chain: POSTROUTING
if [ "$verbose" = "1" ]; then
echo "Create Rules for Chain: POSTROUTING"
fi

                   
$IPT -t mangle -P POSTROUTING ACCEPT || { status="1"; echo " Setting up Rule: Chain: POSTROUTING Default Target FAILED! Clearing Rules!";  stopFirewall; exit 1; }


if [ "$verbose" = "1" ]; then
echo -n "Enable IP Forwarding.                "
fi



echo 1 > /proc/sys/net/ipv4/ip_forward
if [ "$verbose" = "1" ]; then
echo "Done."
fi


if [ "$verbose" = "1" ]; then
echo -n "Disable Reverse Path Filtering       "
fi


for i in /proc/sys/net/ipv4/conf/*/rp_filter ; do
echo 0 > $i
done
if [ "$verbose" = "1" ]; then
echo "Done."
fi


if [ "$verbose" = "1" ]; then
echo -n "Disable log_martians (logging).           "
fi


for i in /proc/sys/net/ipv4/conf/*/log_martians ; do
echo 0 > $i
done
if [ "$verbose" = "1" ]; then
echo "Done."
fi


if [ "$verbose" = "1" ]; then
echo -n "Enable Syn Cookies.          "
fi



echo 1 > /proc/sys/net/ipv4/tcp_syncookies
if [ "$verbose" = "1" ]; then
echo "Done."
fi


echo Done.
}
stopFirewall() {
  echo -n "Clearing iptables (created by KMyFirewall)...       "

  $IPT -t filter -F || status="1"
  $IPT -t filter -X || status="1"
  $IPT -t filter -P INPUT ACCEPT || status="1"
  $IPT -t filter -P OUTPUT ACCEPT || status="1"
  $IPT -t filter -P FORWARD ACCEPT || status="1"

  $IPT -t nat -F || status="1"
  $IPT -t nat -X || status="1"
  $IPT -t nat -P OUTPUT ACCEPT || status="1"
  $IPT -t nat -P PREROUTING ACCEPT || status="1"
  $IPT -t nat -P POSTROUTING ACCEPT || status="1"

  $IPT -t mangle -F || status="1"
  $IPT -t mangle -X || status="1"
  $IPT -t mangle -P INPUT ACCEPT || status="1"
  $IPT -t mangle -P OUTPUT ACCEPT || status="1"
  $IPT -t mangle -P OUTPUT ACCEPT || status="1"
  $IPT -t mangle -P PREROUTING ACCEPT || status="1"
  $IPT -t mangle -P POSTROUTING ACCEPT || status="1"

  echo "Done."

}
IPT="/sbin/iptables"
MOD="/sbin/modprobe"
status="0"
verbose="0"
action="$1"
if [ "$1" = "-v" ]; then
    verbose="1"
fi

if [ "$1" = "--verbose" ]; then
    verbose="1"
fi

if [ "$verbose" = "1" ]; then
    if [ "$2" = "" ]; then
    echo "Usage: sh kmyfirewall.sh [-v|--verbose] { start | stop | restart }"
    exit 1
  fi
action="$2"
fi

case $action in
  start)
  stopFirewall
  startFirewall
  ;;
  stop)
  stopFirewall
  ;;
  restart)
  stopFirewall
  startFirewall
  ;;
  *)
  echo "Invalid action!
Usage: sh kmyfirewall.sh [-v|--verbose] { start | stop | restart }"
  ;;
  esac

if [ "$status" = "1" ]; then
  exit 1
else
  exit 0
fi



O que preciso modificar ou se vc joga quake live como está configurado o seu firewall???

Obrigado

Hqx
Sem distro Linux fixa - Kernel Omnislash
Meu objetivo nesse fórum é ajudar. Sou um mero humano mas desejo sempre aprender e melhorar em tudo o que faço em minha vida. Então, por favor, quando eu postar me notifique depois

Hqxriven

Consegui resolver fazendo um firewall com iptables já que o firestarter, ufw e outros impossibilitavam o site de funcionar adequadamente...
Sem distro Linux fixa - Kernel Omnislash
Meu objetivo nesse fórum é ajudar. Sou um mero humano mas desejo sempre aprender e melhorar em tudo o que faço em minha vida. Então, por favor, quando eu postar me notifique depois