Multi source/destination ip address
Hello...
Today I have stopped on next problem. I've just want to block almost all connection on 80 port in my router with destination list's addresses. "Almost" because some connection are forwarded to another router in my LAN. So this is the rule:
iptables -A FORWARD -p tcp -port 80 -d ! 192.168.131.0/24 && 192.168.110.0/24 -j DROP
But it doesn't work.... in iptables spec. -d is only connect with single address not list. I found also iprange extension but it doesn't suit me. Is it possible to have list destination/source addresses in iptables rule?
Thanks,
Marcin
solaris
is netfilter available for solars ? any docs on this would be apreciated
cheers
dave
Re: solaris
Hi Dave,
Quoted 2 lines · dave frost
is netfilter available for solars ? any docs on this would be apreciated
No it's not, and it will very likely never be available on Solaris, or any other OS besides Linux, as it's built into the kernel's network code, and this kernel network code is too different from one Unix flavor to another.
Regards,
Filip
Quoted 10 lines · Marcin Giedz
Hello...
Today I have stopped on next problem. I've just want to block almost all connection on 80 port in my router with destination list's addresses. "Almost" because some connection are forwarded to another router in my LAN. So this is the rule:
iptables -A FORWARD -p tcp -port 80 -d ! 192.168.131.0/24 && 192.168.110.0/24 -j DROP
Quoted 6 lines
But it doesn't work.... in iptables spec. -d is only connect with single address not list. I found also iprange extension but it doesn't suit me. Is it possible to have list destination/source addresses in iptables rule?
Thanks,
Marcin
iptables -N MYDROPCHAIN
iptables -A FORWARD -p tcp -port 80 -j MYDROPCHAIN iptables -A MYDROPCHAIN -d 192.168.131.0/24 -j RETURN iptables -A MYDROPCHAIN -d 192.168.110.0/24 -j RETURN iptables -A MYDROPCHAIN -j DROP
Regards.
Signature · 12 lines
Jose Maria Lopez Hernandez Director Tecnico de bgSEC [email protected] bgSEC Seguridad y Consultoria de Sistemas Informaticos http://www.bgsec.com ESPAÑA The only people for me are the mad ones -- the ones who are mad to live, mad to talk, mad to be saved, desirous of everything at the same time, the ones who never yawn or say a commonplace thing, but burn, burn, burn like fabulous yellow Roman candles. -- Jack Kerouac, "On the Road"
Re: solaris
In reply to Filip SneppeSun is about to release the Solaris source code to the open community. This changes things a bit.
Best regards,
Michael D. Peters
Director of Security Services
CISSP
Lazarus Alliance Inc.
M: 502-767-3448
O: 502-231-8017 x8
H: 502-231-6923
F: 502-231-5347
[email protected]
www.lazarusalliance.com
----- Original Message ----- From: "Filip Sneppe" <[email protected]>
To: "dave frost" <[email protected]>
Cc: "netfilter" <[email protected]>
Sent: Monday, February 21, 2005 9:59 AM
Subject: Re: solaris
Quoted 15 lines
Hi Dave,
Quoted 2 lines · dave frost
is netfilter available for solars ? any docs on this would be apreciated
No it's not, and it will very likely never be available on Solaris, or any other OS besides Linux, as it's built into the kernel's network code, and this kernel network code is too different from one Unix flavor to another.
Regards,
Filip
Re: solaris
In reply to Filip SneppeQuoted 10 lines · Filip Sneppe
Hi Dave,
Quoted 2 lines · dave frost
is netfilter available for solars ? any docs on this would be apreciated
No it's not, and it will very likely never be available on Solaris, or any other OS besides Linux, as it's built into the kernel's network code, and this kernel network code is too different from one Unix flavor to another.
sunscreen I beleive is the SUN alt for this, at least in sol9, I think it's an addon <perhaps w/ cost under sol8>. I have heard that ip filter is part of the sol10 offering coming out.
Thanks,
Ron DuFresne
Signature · 11 lines
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
admin & senior security consultant: sysinfo.com
http://sysinfo.com
...Love is the ultimate outlaw. It just won't adhere to rules.
The most any of us can do is sign on as it's accomplice. Instead
of vowing to honor and obey, maybe we should swear to aid and abet.
That would mean that security is out of the question. The words
"make" and "stay" become inappropriate. My love for you has no
strings attached. I love you for free...
-Tom Robins <Still Life With Woodpecker>Hi,
Quoted 10 lines · Jose Maria Lopez Hernandez
El lun, 21-02-2005 a las 15:33 +0100, Marcin Giedz escribi??:
Quoted 2 lines
Hello...
iptables -N MYDROPCHAIN
iptables -A FORWARD -p tcp -port 80 -j MYDROPCHAIN iptables -A MYDROPCHAIN -d 192.168.131.0/24 -j RETURN iptables -A MYDROPCHAIN -d 192.168.110.0/24 -j RETURN iptables -A MYDROPCHAIN -j DROP
Do I really need the -j RETURN Target, an the -j DROP Target in the Chain? Because I am using also User defined Chainces, and I am only using chainces without -j DROP only with -j ACCEPT and I don't use the -j RETURN Target.
Chain OUTPUT (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination 40101 8406K ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED 2908 265K ping_TRNW all -- * * 0.0.0.0/0 0.0.0.0/0 2895 265K all_tcp_ins_inet all -- * * 0.0.0.0/0 0.0.0.0/0 2340 231K all_udp_ins_inet all -- * * 0.0.0.0/0 0.0.0.0/0 1007 134K ping_to_inet all -- * * 0.0.0.0/0 0.0.0.0/0 1005 134K lo_tcp_out all -- * * 0.0.0.0/0 0.0.0.0/0 974 132K lo_udp_out all -- * * 0.0.0.0/0 0.0.0.0/0 872 124K LOG all -- * * 0.0.0.0/0 0.0.0.0/0 LOG flags 0 level 4 prefix `OUTPUT-DENY ' 872 124K REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable
Chain all_tcp_ins_inet (1 references)
pkts bytes target prot opt in out source destination 555 33300 ACCEPT tcp -- * ppp0 0.0.0.0/0 0.0.0.0/0 state NEW tcp
Chain all_udp_ins_inet (1 references)
pkts bytes target prot opt in out source destination 1333 97563 ACCEPT udp -- * ppp0 0.0.0.0/0 0.0.0.0/0 state NEW udp
Quoted 19 lines
Regards.
Signature · 12 lines
Jose Maria Lopez Hernandez Director Tecnico de bgSEC [email protected] bgSEC Seguridad y Consultoria de Sistemas Informaticos http://www.bgsec.com ESPA??A The only people for me are the mad ones -- the ones who are mad to live, mad to talk, mad to be saved, desirous of everything at the same time, the ones who never yawn or say a commonplace thing, but burn, burn, burn like fabulous yellow Roman candles. -- Jack Kerouac, "On the Road"
Signature · 1 line
Sebastian Docktor <[email protected]>