* why scapy packet no effected by ip tables
@ 2014-07-16 12:46 Abogholo A
2014-07-17 15:23 ` Phil Oester
0 siblings, 1 reply; 4+ messages in thread
From: Abogholo A @ 2014-07-16 12:46 UTC (permalink / raw)
To: netfilter
HI
i wrote this rule for change all udp destination ip address to 8.8.8.8
when dport is 53:
iptables -t nat -A OUTPUT -p udp -m udp --dport 53 -j DNAT
--to-destination 8.8.8.8
but when send this packet
sr1(IP(dst="4.2.2.4")/UDP()/DNS(rd=1,qd=DNSQR(qname="iranled.com")))
iptables no effected to them
why?
more details:
http://unix.stackexchange.com/questions/144729/iptables-rule-no-actions-on-scapy-packets
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: why scapy packet no effected by ip tables
2014-07-16 12:46 why scapy packet no effected by ip tables Abogholo A
@ 2014-07-17 15:23 ` Phil Oester
2014-07-20 16:27 ` Paul Robert Marino
0 siblings, 1 reply; 4+ messages in thread
From: Phil Oester @ 2014-07-17 15:23 UTC (permalink / raw)
To: Abogholo A; +Cc: netfilter
On Wed, Jul 16, 2014 at 05:16:21PM +0430, Abogholo A wrote:
> i wrote this rule for change all udp destination ip address to 8.8.8.8
> when dport is 53:
>
> iptables -t nat -A OUTPUT -p udp -m udp --dport 53 -j DNAT
> --to-destination 8.8.8.8
>
> but when send this packet
>
> sr1(IP(dst="4.2.2.4")/UDP()/DNS(rd=1,qd=DNSQR(qname="iranled.com")))
>
> iptables no effected to them
>
> why?
Scapy uses raw sockets, which don't go through iptables.
Phil
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: why scapy packet no effected by ip tables
2014-07-17 15:23 ` Phil Oester
@ 2014-07-20 16:27 ` Paul Robert Marino
2014-07-21 12:38 ` Jeff White
0 siblings, 1 reply; 4+ messages in thread
From: Paul Robert Marino @ 2014-07-20 16:27 UTC (permalink / raw)
To: Phil Oester; +Cc: Abogholo A, netfilter
look at ebtables instead.
On Thu, Jul 17, 2014 at 11:23 AM, Phil Oester <kernel@linuxace.com> wrote:
> On Wed, Jul 16, 2014 at 05:16:21PM +0430, Abogholo A wrote:
>> i wrote this rule for change all udp destination ip address to 8.8.8.8
>> when dport is 53:
>>
>> iptables -t nat -A OUTPUT -p udp -m udp --dport 53 -j DNAT
>> --to-destination 8.8.8.8
>>
>> but when send this packet
>>
>> sr1(IP(dst="4.2.2.4")/UDP()/DNS(rd=1,qd=DNSQR(qname="iranled.com")))
>>
>> iptables no effected to them
>>
>> why?
>
> Scapy uses raw sockets, which don't go through iptables.
>
> Phil
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: why scapy packet no effected by ip tables
2014-07-20 16:27 ` Paul Robert Marino
@ 2014-07-21 12:38 ` Jeff White
0 siblings, 0 replies; 4+ messages in thread
From: Jeff White @ 2014-07-21 12:38 UTC (permalink / raw)
To: Paul Robert Marino, Phil Oester; +Cc: Abogholo A, netfilter
Obviously you are doing this for DNS, you need TCP too. If a DNS
request or response is larger than 512 bytes it will use TCP.
Jeff White - GNU+Linux Systems Administrator
University of Pittsburgh - CSSD
On 07/20/2014 12:27 PM, Paul Robert Marino wrote:
> look at ebtables instead.
>
>
> On Thu, Jul 17, 2014 at 11:23 AM, Phil Oester <kernel@linuxace.com> wrote:
>> On Wed, Jul 16, 2014 at 05:16:21PM +0430, Abogholo A wrote:
>>> i wrote this rule for change all udp destination ip address to 8.8.8.8
>>> when dport is 53:
>>>
>>> iptables -t nat -A OUTPUT -p udp -m udp --dport 53 -j DNAT
>>> --to-destination 8.8.8.8
>>>
>>> but when send this packet
>>>
>>> sr1(IP(dst="4.2.2.4")/UDP()/DNS(rd=1,qd=DNSQR(qname="iranled.com")))
>>>
>>> iptables no effected to them
>>>
>>> why?
>>
>> Scapy uses raw sockets, which don't go through iptables.
>>
>> Phil
>> --
>> To unsubscribe from this list: send the line "unsubscribe netfilter" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-07-21 12:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-16 12:46 why scapy packet no effected by ip tables Abogholo A
2014-07-17 15:23 ` Phil Oester
2014-07-20 16:27 ` Paul Robert Marino
2014-07-21 12:38 ` Jeff White
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).