From: Georgi Alexandrov <georgi.alexandrov@gmail.com>
To: netfilter@lists.netfilter.org
Subject: Re: Wrong ips
Date: Thu, 01 Feb 2007 13:37:32 +0200 [thread overview]
Message-ID: <45C1D0FC.9050908@gmail.com> (raw)
In-Reply-To: <200702010851.14795.alp@rosten.elektra.ru>
[-- Attachment #1: Type: text/plain, Size: 3777 bytes --]
Alexander Pyhalov wrote:
> Hello.
> Maybe I'm doing something wrong, but I have the following trouble.
> I have kernel 2.6.17.11 and options, related to netfilter in it :
> //////////////////////////////////////////////
> CONFIG_NETFILTER=y
> CONFIG_NETFILTER_NETLINK=m
> CONFIG_NETFILTER_NETLINK_LOG=m
> CONFIG_NETFILTER_XTABLES=m
> CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
> CONFIG_IP_NF_CONNTRACK=m
> CONFIG_IP_NF_FTP=m
> CONFIG_IP_NF_IRC=m
> CONFIG_IP_NF_TFTP=m
> CONFIG_IP_NF_AMANDA=m
> CONFIG_IP_NF_QUEUE=m
> CONFIG_IP_NF_IPTABLES=m
> CONFIG_IP_NF_MATCH_IPRANGE=m
> CONFIG_IP_NF_FILTER=m
> CONFIG_IP_NF_TARGET_REJECT=m
> CONFIG_IP_NF_TARGET_LOG=m
> CONFIG_IP_NF_TARGET_ULOG=m
> //////////////////////////////////////////////
>
> lsmod shows, that all related to netfilter (as I think) modules are loaded:
> af_packet 16904 0
> xt_tcpudp 3584 0
> ip_queue 8480 0
> ipt_iprange 1920 0
> ipt_REJECT 4608 0
> ipt_LOG 6656 0
> iptable_filter 2816 0
> ip_tables 14556 1 iptable_filter
> x_tables 12932 5 xt_tcpudp,ipt_iprange,ipt_REJECT,ipt_LOG,ip_tables
> capability 5128 0
> commoncap 7424 1 capability
> ...
>
> iptables version is 1.3.6
>
> I'm trying to add some rules, but they don't work, when contain port numbers:
>
> When I'm adding the following rule
>
> # Access to HTTP server
> iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
> # Access to SSH is allowed to all
> iptables -A INPUT -p tcp -m --dport 22 -j ACCEPT
This line is wrong ^
> # Access to Tomcat
> iptables -A INPUT -s <ip1>ACCEPT
> iptables -A INPUT -s <ip2> -j ACCEPT
> # Access to SMB is allowed to all
> iptables -A INPUT -p tcp -m --dport 139 -j ACCEPT
> iptables -A INPUT -p tcp -m --dport 445 -j ACCEPT
> iptables -P INPUT REJECT
>
> I can't ssh to server.
> When I do
> iptables -A INPUT -s <my ip> -j ACCEPT
> everything is fine.
>
> Now I do
>
> iptables -A INPUT -p tcp -m tcp -s <my ip> -j LOG
>
> and got something strange in log:
> eb 1 08:15:12 athena kernel: IN=eth0 OUT= MAC=00:0d:60:eb:a7:7c:00:02:b3:d6:be:9d:08:00 SRC=58.48.57.58 DST=255.255.0.13 LEN=15942 TOS=0x14
> PREC=0x20 TTL=49 ID=25954 MF FRAG:32 PROTO=32
> Feb 1 08:15:12 athena kernel: IN=eth0 OUT= MAC=00:0d:60:eb:a7:7c:00:02:b3:d6:be:9d:08:00 SRC=58.48.57.58 DST=47.98.0.13 LEN=15942 TOS=0x14 P
> REC=0x20 TTL=49 ID=25954 MF FRAG:32 PROTO=32
> Feb 1 08:15:12 athena kernel: IN=eth0 OUT= MAC=00:0d:60:eb:a7:7c:00:02:b3:d6:be:9d:08:00 SRC=0.0.8.0 DST=0.0.0.13 LEN=0 TOS=0x00 PREC=0x00 T
> TL=0 ID=0 PROTO=0
> Feb 1 08:15:12 athena kernel: IN=eth0 OUT= MAC=00:0d:60:eb:a7:7c:00:02:b3:d6:be:9d:08:00 SRC=58.48.57.58 DST=0.0.0.13 LEN=15942 TOS=0x14 PRE
> C=0x20 TTL=49 ID=25954 MF FRAG:32 PROTO=32
> Feb 1 08:15:12 athena kernel: IN=eth0 OUT= MAC=00:0d:60:eb:a7:7c:00:02:b3:d6:be:9d:08:00 SRC=58.49.48.58 DST=255.255.0.13 LEN=15942 TOS=0x14
> PREC=0x20 TTL=49 ID=25954 MF FRAG:32 PROTO=32
> Feb 1 08:15:13 athena kernel: IN=eth0 OUT= MAC=00:0d:60:eb:a7:7c:00:02:b3:d6:be:9d:08:00 SRC=58.48.57.58 DST=255.255.0.13 LEN=15942 TOS=0x14
> PREC=0x20 TTL=49 ID=25954 MF FRAG:32 PROTO=32
> Feb 1 08:15:13 athena kernel: IN=eth0 OUT= MAC=00:0d:60:eb:a7:7c:00:02:b3:d6:be:9d:08:00 SRC=0.0.0.0 DST=0.0.0.13 LEN=19526 TOS=0x04 PREC=0x
> 40 TTL=0 ID=257 FRAG:256 PROTO=0
>
> But these ip addresses are not my ip addresses.
> They even don't exist in network environment....
>
>
>
>
--
regards,
Georgi Alexandrov
key server - pgp.mit.edu :: key id - 0x37B4B3EE
Key fingerprint = E429 BF93 FA67 44E9 B7D4 F89E F990 01C1 37B4 B3EE
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2007-02-01 11:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-01 5:51 Wrong ips Alexander Pyhalov
2007-02-01 11:37 ` Georgi Alexandrov [this message]
2007-02-01 11:48 ` Alexander Pyhalov
2007-02-01 16:25 ` Pascal Hambourg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45C1D0FC.9050908@gmail.com \
--to=georgi.alexandrov@gmail.com \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.