alias interfaces
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]
Quoted 7 lines · Mario Antonio
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.
Quoted 4 lines
/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.
Quoted 1 line
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.
Signature · 3 lines
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--?
A message that is not in the archive (sent off-list or not yet received): 03f901c276e0$910fd140$13c01dd0@shadowfax
Quoted 25 lines · Mario Antonio
Antony,
Thanks for your reply. I really appreciate it.
Linux 7.3 and iptables v1.2.7a
eth0=10.10.10.239
eth0:0=10.10.13.227workstation accessing the server: 10.10.10.19
I have the following testing set of rules:
#!
/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
Quoted 3 lines
With my set of rules I can access 10.10.10.239 without any problem. But to access 10.10.13.227, I have to set -->iptables -P INPUT ACCEPT What am I missing?
I don't know. Try adding a LOGging rule at the end of your INPUT chain to
see what extra packets are trying to get in but are being blocked.
Antony.
Signature · 2 lines
Abandon hope, all ye who enter here. You'll feel much better about things once you do.
A message that is not in the archive (sent off-list or not yet received): 041501c276e7$489b5ea0$13c01dd0@shadowfax
Quoted 7 lines · Mario Antonio
Antony,
I add the following rule:
/usr/local/sbin/iptables-A INPUT -j LOG --log-prefix "IPTABLES-IN "And I get the following message, While triyng to access through port 80:
Quoted 7 lines
Oct 18 16:30:00 web_2 kernel: IPTABLES-IN IN=eth0 OUT=MAC=00:06:5b:8c:72:5f:00:b0:d0:15:1d:37:08:00 SRC=10.10.10.19 DST=10.10.13.227 LEN=48 TOS=0x00 PREC=0x00 TTL=128 ID=34547 PROTO=TCP SPT=1799 DPT=80 WINDOW=65520 RES=0x00 SYN URGP=0
Any clue?
How can this log tell me that that packet was blocked?
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.
PS: Please answer to the list.
Signature · 3 lines
Anything that improbable is effectively impossible. - Murray Gell-Mann, Nobel Prizewinner in Physics