[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Como fazer p/ o iptables não jogar log no bash



Edmundo Valle Neto escreveu:
Gunther Furtado escreveu:
hamacker escreveu:
rapido no google :
http://www.sounerd.com.br/index.php?option=com_content&task=view&id=24&Itemid=43

Para mim, não funcionou:

~$ dmesg | tail
ABORTED IN=eth0 OUT= MAC=00:02:2a:d2:e0:78:00:04:16:02:e3:f9:08:00 SRC=75.9.33.224 DST=192.168.1.34 LEN=40 TOS=0x00 PREC=0x00 TTL=239 ID=9219 DF PROTO=TCP SPT=1814 DPT=6346 SEQ=1090771725 ACK=1000136658 WINDOW=0 RES=0x00 ACK RST URGP=0 ABORTED IN=eth0 OUT= MAC=00:02:2a:d2:e0:78:00:04:16:02:e3:f9:08:00 SRC=84.153.70.151 DST=192.168.1.34 LEN=40 TOS=0x00 PREC=0x00 TTL=109 ID=63248 DF PROTO=TCP SPT=16462 DPT=6346 SEQ=3228135934 ACK=1225491762 WINDOW=0 RES=0x00 RST URGP=0 ABORTED IN=eth0 OUT= MAC=00:02:2a:d2:e0:78:00:04:16:02:e3:f9:08:00 SRC=75.9.33.224 DST=192.168.1.34 LEN=40 TOS=0x00 PREC=0x00 TTL=239 ID=9220 DF PROTO=TCP SPT=1896 DPT=6346 SEQ=1284783804 ACK=1032352907 WINDOW=0 RES=0x00 ACK RST URGP=0 ABORTED IN=eth0 OUT= MAC=00:02:2a:d2:e0:78:00:04:16:02:e3:f9:08:00 SRC=75.9.33.224 DST=192.168.1.34 LEN=40 TOS=0x00 PREC=0x00 TTL=239 ID=9221 DF PROTO=TCP SPT=1915 DPT=6346 SEQ=3342334428 ACK=1030418543 WINDOW=0 RES=0x00 ACK RST URGP=0 ABORTED IN=eth0 OUT= MAC=00:02:2a:d2:e0:78:00:04:16:02:e3:f9:08:00 SRC=208.106.33.199 DST=192.168.1.34 LEN=40 TOS=0x00 PREC=0x00 TTL=119 ID=31548 DF PROTO=TCP SPT=31061 DPT=5048 SEQ=1006301889 ACK=726103319 WINDOW=0 RES=0x00 ACK RST URGP=0 ABORTED IN=eth0 OUT= MAC=00:02:2a:d2:e0:78:00:04:16:02:e3:f9:08:00 SRC=209.62.176.152 DST=192.168.1.34 LEN=40 TOS=0x00 PREC=0x00 TTL=238 ID=16627 DF PROTO=TCP SPT=80 DPT=1503 SEQ=3643311717 ACK=1107441983 WINDOW=0 RES=0x00 ACK RST URGP=0 ABORTED IN=eth0 OUT= MAC=00:02:2a:d2:e0:78:00:04:16:02:e3:f9:08:00 SRC=75.9.33.224 DST=192.168.1.34 LEN=40 TOS=0x00 PREC=0x00 TTL=239 ID=33025 DF PROTO=TCP SPT=2594 DPT=6346 SEQ=1367316044 ACK=1373741058 WINDOW=0 RES=0x00 ACK RST URGP=0 ABORTED IN=eth0 OUT= MAC=00:02:2a:d2:e0:78:00:04:16:02:e3:f9:08:00 SRC=189.148.70.208 DST=192.168.1.34 LEN=40 TOS=0x00 PREC=0x00 TTL=245 ID=16385 DF PROTO=TCP SPT=4146 DPT=6346 SEQ=715772820 ACK=1511027191 WINDOW=0 RES=0x00 ACK RST URGP=0 ABORTED IN=eth0 OUT= MAC=00:02:2a:d2:e0:78:00:04:16:02:e3:f9:08:00 SRC=62.31.75.214 DST=192.168.1.34 LEN=40 TOS=0x00 PREC=0x00 TTL=42 ID=22578 DF PROTO=TCP SPT=4138 DPT=6346 SEQ=4104528971 ACK=1364154353 WINDOW=0 RES=0x00 ACK RST URGP=0 ABORTED IN=eth0 OUT= MAC=00:02:2a:d2:e0:78:00:04:16:02:e3:f9:08:00 SRC=70.18.5.153 DST=192.168.1.34 LEN=40 TOS=0x00 PREC=0x00 TTL=109 ID=36632 DF PROTO=TCP SPT=50485 DPT=6346 SEQ=2858024549 ACK=1156488689 WINDOW=0 RES=0x00 ACK RST URGP=0
~$


O arquivo /etc/sysctl.conf no Etch já vem com uma linha comentada para que mensagens de log de baixo nível não sejam mandadas para a console. É só descomentar.

# Uncomment the following to stop low-level messages on console
#kernel.printk = 4 4 1 7


Já tentei o procedimento, aparentemente, isto impede que as mensagens começadas por DROPPED e BLOCKED cheguem ao console, mas as mensagens começadas por ABORTED continuam chegando. Talvez isso possa ser corrigido alterando os valores numéricos da linha

#kernel.printk = 4 4 1 7

mas eu não sei o que eles significam. Não achei nada no manual nem no google.

saídas:
root@sargento:~# cat /etc/sysctl.conf
#
# /etc/sysctl.conf - Configuration file for setting system variables
# See sysctl.conf (5) for information.
#

#kernel.domainname = example.com
#net/ipv4/icmp_echo_ignore_broadcasts=1

# Uncomment the following to stop low-level messages on console
kernel.printk = 4 4 1 7

##############################################################3
# Functions previously found in netbase
#

# Uncomment the next line to enable Spoof protection (reverse-path filter)
#net.ipv4.conf.default.rp_filter=1

# Uncomment the next line to enable TCP/IP SYN cookies
#net.ipv4.tcp_syncookies=1

# Uncomment the next line to enable packet forwarding for IPv4
#net.ipv4.conf.default.forwarding=1

# Uncomment the next line to enable packet forwarding for IPv6
#net.ipv6.conf.default.forwarding=1

root@sargento:~#

--------------

root@sargento:~# dmesg | tail
input: cx88 IR (PixelView PlayTV Ultra as /class/input/input3
cx88[0]/0: found at 0000:00:09.0, rev: 5, irq: 5, latency: 32, mmio: 0xe2000000
tuner 0-0061: chip found @ 0xc2 (cx88[0])
tuner 0-0061: type set to 43 (Philips NTSC MK3 (FM1236MK3 or FM1236/F))
tuner 0-0061: type set to 43 (Philips NTSC MK3 (FM1236MK3 or FM1236/F))
tuner 0-0063: chip found @ 0xc6 (cx88[0])
cx88[0]/0: registered device video0 [v4l2]
cx88[0]/0: registered device vbi0
cx88[0]/0: registered device radio0
ABORTED IN=eth0 OUT= MAC=00:02:2a:d2:e0:78:00:04:16:02:e3:f9:08:00 SRC=72.51.46.57 DST=192.168.1.34 LEN=40 TOS=0x00 PREC=0x00 TTL=46 ID=0 DF PROTO=TCP SPT=80 DPT=1181 SEQ=2351433501 ACK=0 WINDOW=0 RES=0x00 RST URGP=0
root@sargento:~#

abraço,


--
Gunther Furtado
gunzera0@yahoo.com.br
Curitiba - PR - Brasil



Reply to: