* Re: alias interfaces
@ 2002-10-18 23:40 Mario Antonio
2002-10-19 8:05 ` Antony Stone
0 siblings, 1 reply; 7+ messages in thread
From: Mario Antonio @ 2002-10-18 23:40 UTC (permalink / raw)
To: netfilter
Antony,
Thanks again for your kindness.
I was also doubting about routing problems, but why when I accept all the
traffic in the INPUT chain, everything works find?
Linux 7.3 and iptables v1.2.7a
eth0=10.10.10.239
eth0:0=10.10.13.227
workstation accessing the server: 10.10.10.19 netmask 255.255.255.0
This is my ifconfig:
eth0 Link encap:Ethernet HWaddr 00:06:5B:8C:72:5F
inet addr:10.10.10.239 Bcast:10.10.10.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:41195 errors:0 dropped:0 overruns:0 frame:0
TX packets:19820 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:12109228 (11.5 Mb) TX bytes:3289639 (3.1 Mb)
Interrupt:16 Base address:0xa000
eth0:0 Link encap:Ethernet HWaddr 00:06:5B:8C:72:5F
inet addr:10.10.13.227 Bcast:10.10.13.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:16 Base address:0xa000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:11 errors:0 dropped:0 overruns:0 frame:0
TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:812 (812.0 b) TX bytes:812 (812.0 b)
This is my netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt
Iface
10.10.10.0 0.0.0.0 255.255.255.0 U 40 0 0 eth0
10.10.13.0 0.0.0.0 255.255.255.0 U 40 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 40 0 0 lo
0.0.0.0 10.10.10.1 0.0.0.0 UG 40 0 0 eth0
My simple rules againg:
#! /bin/sh
/usr/local/sbin/iptables -F
/usr/local/sbin/iptables -P INPUT DROP
#/usr/local/sbin/iptables -A INPUT -j LOG --log-prefix "IPTABLES-IN "
/usr/local/sbin/iptables -P FORWARD ACCEPT
/usr/local/sbin/iptables -P OUTPUT ACCEPT
/usr/local/sbin/iptables -A INPUT -m state --state RELATED,ESTABLISHED -j
ACCEPT
/usr/local/sbin/iptables -A INPUT -s 10.10.10.19 -d 10.10.10.239 -p tcp -m
tcp --dport 80 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
/usr/local/sbin/iptables -A INPUT -i eth0 -s 10.10.10.19 -d
10.10.13.227 -p tcp -m tcp --dport 80 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
/usr/local/sbin/iptables -A INPUT -j LOG --log-prefix "IPTABLES-IN "
Regards
Mario
----------------------------------------------------------------------------
----------------
Log entries do not tell you whether the packet is accepted, dropped,
rejected, or whatever. They simply record the fact that the packet was
seen
at the position in the ruleset where you have your logging rule.
It is the rule/s which come after that (or the default policy) which
determines what actually happens to the packets.
What netmask do you have on your machines ?
Antony.
---
[This e-mail was scanned for viruses by Webjogger's AntiVirus Protection System]
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: alias interfaces
2002-10-18 23:40 alias interfaces Mario Antonio
@ 2002-10-19 8:05 ` Antony Stone
2002-10-19 19:08 ` Mario Antonio
0 siblings, 1 reply; 7+ messages in thread
From: Antony Stone @ 2002-10-19 8:05 UTC (permalink / raw)
To: netfilter
On Saturday 19 October 2002 12:40 am, Mario Antonio wrote:
> Antony,
>
> Thanks again for your kindness.
>
> I was also doubting about routing problems, but why when I accept all the
> traffic in the INPUT chain, everything works fine?
I can't say, but your netmask / routing table is the problem.
> Linux 7.3 and iptables v1.2.7a
> eth0=10.10.10.239
> eth0:0=10.10.13.227
> workstation accessing the server: 10.10.10.19 netmask 255.255.255.0
This is a Class C netmask. All machines on the local network must have
10.10.10 as the first three bytes of the address. You are trying to contact
address 10.10.13.227, which is on a different network.
Change the aliased address so that it is on the 10.10.10.0 network, or change
your netmask so you have at least a Class B subnet.
Antony
--
KDE 3.0.3 contains an important fix for handling SSL certificates. Users of
Internet Explorer, which suffers from the same problem but which
does not yet have a fix available, are also encouraged to switch to KDE 3.0.3.
http://www.kde.org/announcements/announce-3.0.3.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: alias interfaces
2002-10-19 8:05 ` Antony Stone
@ 2002-10-19 19:08 ` Mario Antonio
0 siblings, 0 replies; 7+ messages in thread
From: Mario Antonio @ 2002-10-19 19:08 UTC (permalink / raw)
To: netfilter
Antony,
Thanks for your feedback and patience.
Things are working nicely now.
Regards ( By the way, I enjoy your sayings in your emails)
Mario
----- Original Message -----
From: "Antony Stone" <Antony@Soft-Solutions.co.uk>
To: <netfilter@lists.netfilter.org>
Sent: Saturday, October 19, 2002 4:05 AM
Subject: Re: alias interfaces
> On Saturday 19 October 2002 12:40 am, Mario Antonio wrote:
>
> > Antony,
> >
> > Thanks again for your kindness.
> >
> > I was also doubting about routing problems, but why when I accept all
the
> > traffic in the INPUT chain, everything works fine?
>
> I can't say, but your netmask / routing table is the problem.
>
> > Linux 7.3 and iptables v1.2.7a
> > eth0=10.10.10.239
> > eth0:0=10.10.13.227
> > workstation accessing the server: 10.10.10.19 netmask 255.255.255.0
>
> This is a Class C netmask. All machines on the local network must have
> 10.10.10 as the first three bytes of the address. You are trying to
contact
> address 10.10.13.227, which is on a different network.
>
> Change the aliased address so that it is on the 10.10.10.0 network, or
change
> your netmask so you have at least a Class B subnet.
>
> Antony
>
> --
>
> KDE 3.0.3 contains an important fix for handling SSL certificates. Users
of
> Internet Explorer, which suffers from the same problem but which
> does not yet have a fix available, are also encouraged to switch to KDE
3.0.3.
>
> http://www.kde.org/announcements/announce-3.0.3.html
>
> ---
> [This e-mail was scanned for viruses by Webjogger's AntiVirus Protection
System]
>
>
---
[This e-mail was scanned for viruses by Webjogger's AntiVirus Protection System]
^ permalink raw reply [flat|nested] 7+ messages in thread
* alias interfaces
@ 2002-10-18 16:20 Mario Antonio
2002-10-18 16:51 ` Antony Stone
0 siblings, 1 reply; 7+ messages in thread
From: Mario Antonio @ 2002-10-18 16:20 UTC (permalink / raw)
To: netfilter
Dear List,
I have configured eth0(10.10.10.2) and the alias interface eth0:0
(10.10.10.3)
do I have to specify both interfaces in my set of rules to allow traffic in?
something like:
/usr/local/sbin/iptables -A INPUT -i eth0 -s 0/0 -d 10.10.10.2 -p tcp -m
tcp --dport 80 -j ACCEPT
/usr/local/sbin/iptables -A INPUT -i eth0:0 -s 0/0 -d 10.10.10.3 -p tcp -m
tcp --dport 80 -j ACCEPT
How shoud I handle the alias interfaces?
Regards
Mario
---
[This e-mail was scanned for viruses by Webjogger's AntiVirus Protection System]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: alias interfaces
2002-10-18 16:20 Mario Antonio
@ 2002-10-18 16:51 ` Antony Stone
[not found] ` <03f901c276e0$910fd140$13c01dd0@shadowfax>
0 siblings, 1 reply; 7+ messages in thread
From: Antony Stone @ 2002-10-18 16:51 UTC (permalink / raw)
To: netfilter
On Friday 18 October 2002 5:20 pm, Mario Antonio wrote:
> Dear List,
>
> I have configured eth0(10.10.10.2) and the alias interface eth0:0
> (10.10.10.3)
>
> do I have to specify both interfaces in my set of rules to allow traffic
> in?
No, in fact you cannot.
> /usr/local/sbin/iptables -A INPUT -i eth0 -s 0/0 -d 10.10.10.2 -p tcp -m
> tcp --dport 80 -j ACCEPT
> /usr/local/sbin/iptables -A INPUT -i eth0:0 -s 0/0 -d 10.10.10.3 -p tcp -m
> tcp --dport 80 -j ACCEPT
You will find that the latter rule generates an error, since netfilter does
not allow : characters in interface names.
> How should I handle the alias interfaces?
For the INPUT chain, specify the destination address. For the FORWARD
chain, it doesn't matter anyway.
Antony.
--
G- GIT/E d- s+:--(-) a+ C++++$ UL++++$ P+(---)>++ L+++(++++)$ !E W(-) N(-) o?
w-- O !M V+++(--) !PS !PE Y+ PGP+> t- tv@ b+++ DI++ D--- e++>+++ h++ r@? 5?
!X- !R K--?
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2002-10-19 19:08 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-18 23:40 alias interfaces Mario Antonio
2002-10-19 8:05 ` Antony Stone
2002-10-19 19:08 ` Mario Antonio
-- strict thread matches above, loose matches on Subject: below --
2002-10-18 16:20 Mario Antonio
2002-10-18 16:51 ` Antony Stone
[not found] ` <03f901c276e0$910fd140$13c01dd0@shadowfax>
2002-10-18 20:01 ` Antony Stone
[not found] ` <041501c276e7$489b5ea0$13c01dd0@shadowfax>
2002-10-18 22:21 ` Antony Stone
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox