Corrupted packets + Logs
Hi all ,
( As far as possible please answer to my 2 questions :-) )
My stuff :
-1 single Computer hosting an FTP server and an HTTP one . that's all . ( no NAT nor FORWARD )
#1
I'm learning networks and i saw that there are some tools that send "corrupted" packets to a host to have an idea of the local OS ( an exemple is nmap ) .
I would like my firewall to drop all corrupted packets .
I made a search on google with the words " iptables drop corrupted packets" but i cannot find any clear-enough documentation .
Would you help me ?
Perhaps you want to see NETFILTER-about configuration of my kernel ? Here you are :CONFIG_IP_NF_CONNTRACK=yCONFIG_IP_NF_FTP=y
# CONFIG_IP_NF_AMANDA is not set
# CONFIG_IP_NF_TFTP is not setCONFIG_IP_NF_IRC=yCONFIG_IP_NF_QUEUE=yCONFIG_IP_NF_IPTABLES=yCONFIG_IP_NF_MATCH_LIMIT=yCONFIG_IP_NF_MATCH_MAC=yCONFIG_IP_NF_MATCH_PKTTYPE=yCONFIG_IP_NF_MATCH_MARK=yCONFIG_IP_NF_MATCH_MULTIPORT=yCONFIG_IP_NF_MATCH_TOS=y
# CONFIG_IP_NF_MATCH_RECENT is not set
# CONFIG_IP_NF_MATCH_ECN is not set
# CONFIG_IP_NF_MATCH_DSCP is not setCONFIG_IP_NF_MATCH_AH_ESP=yCONFIG_IP_NF_MATCH_LENGTH=yCONFIG_IP_NF_MATCH_TTL=yCONFIG_IP_NF_MATCH_TCPMSS=y
# CONFIG_IP_NF_MATCH_HELPER is not setCONFIG_IP_NF_MATCH_STATE=yCONFIG_IP_NF_MATCH_CONNTRACK=yCONFIG_IP_NF_MATCH_UNCLEAN=yCONFIG_IP_NF_MATCH_OWNER=yCONFIG_IP_NF_FILTER=yCONFIG_IP_NF_TARGET_REJECT=yCONFIG_IP_NF_TARGET_MIRROR=yCONFIG_IP_NF_NAT=yCONFIG_IP_NF_NAT_NEEDED=yCONFIG_IP_NF_TARGET_MASQUERADE=yCONFIG_IP_NF_TARGET_REDIRECT=yCONFIG_IP_NF_NAT_LOCAL=yCONFIG_IP_NF_NAT_SNMP_BASIC=mCONFIG_IP_NF_NAT_IRC=yCONFIG_IP_NF_NAT_FTP=yCONFIG_IP_NF_MANGLE=yCONFIG_IP_NF_TARGET_TOS=yCONFIG_IP_NF_TARGET_ECN=yCONFIG_IP_NF_TARGET_DSCP=yCONFIG_IP_NF_TARGET_MARK=yCONFIG_IP_NF_TARGET_LOG=yCONFIG_IP_NF_TARGET_ULOG=yCONFIG_IP_NF_TARGET_TCPMSS=yCONFIG_IP_NF_ARPTABLES=y
# CONFIG_IP_NF_ARPFILTER is not set
# CONFIG_IP_NF_ARP_MANGLE is not set
#2
I would like iptables to log into /var/log/messages . What have a got to configure into syslogd && iptables to do it ? What rules have i got ad apply ?
If there is a better solution than making it into messages , how should i manage it ?
I already saw, after a google search , tha tkind of questions but the answers are un little bit complicated for me .
Would you have i link ( at least ) tha texplain it to me ?
Thanks for all , in advance .
Quoted 7 lines · On 17 September 2003 12:56 Rakotomandimby Mihamina wrote:
#1
I'm learning networks and i saw that there are some tools that send "corrupted" packets to a host to have an idea of the local OS ( an exemple is nmap ) .
I would like my firewall to drop all corrupted packets .
I made a search on google with the words " iptables drop corrupted packets" but i cannot find any clear-enough documentation .
There is a Netfilter Extension called "unclean" , which have the state of Experimental. You can try to use this one. Possible Checks are: packet lenght, packet checksum, lenght of a fragment if available, invalid icmp-codes, tcp/udp port 0 testing.
Quoted 4 lines
#2
I would like iptables to log into/var/log/messages. What have a got to configure into syslogd && iptables to do it ? What rules have i got ad apply ?
You can use the the target log along with a log-prefix and configure your syslogd to write all Kernel-Messages (Netfilter is Kernel based) to your /var/log/messages.
iptables -A FORWARD -p tcp --dport 80 -s $EXTNET -d $WWW -j LOG --log-prefix WWW-Connection
Greetings,
Thorsten Scherf
RHCE, RHCX