LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   iptables virtual interfaces (https://www.linuxquestions.org/questions/linux-security-4/iptables-virtual-interfaces-843971/)

sparkey 11-12-2010 06:19 PM

iptables virtual interfaces
 
Hey,

I have kind of default iptables set up in debian but i cant get it to work for my virtual interfaces. I cant even ping as soon as i activates my virtual nics for example eth0:1,eth0:2,eth0:3 and so on. It's getting rejected by the iptables in the syslog. I would just like to set the same rule for all eth0 ifaces but maybe thats not possible.

Grateful for all answers.

This is how the iptables look.
Code:

*filter

# Allows all loopback (lo0) traffic and drop all traffic to 127/8 that doesn't use lo0
-A INPUT -i lo -j ACCEPT
-A INPUT -i ! lo -d 127.0.0.0/8 -j REJECT

# Accepts all established inbound connections
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

# Allows all outbound traffic
# You could modify this to only allow certain traffic
-A OUTPUT -j ACCEPT

# Allows SSH
-A INPUT -p tcp --dport 22 -j ACCEPT

# Allow PRD
-A INPUT -p udp --dport 35522:35550 -j ACCEPT

# Allow Misc
-A INPUT -p udp --dport 1200 -j ACCEPT
-A INPUT -p tcp --dport 6003 -j ACCEPT
-A INPUT -p tcp --dport 7002 -j ACCEPT

# Allow ping
-A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT

# log iptables denied calls (access via 'dmesg' command)
-A INPUT -m limit --limit 5/min -j LOG --log-prefix "iptables denied: " --log-level 7

# Reject all other inbound - default deny unless explicitly allowed policy:
-A INPUT -j REJECT
-A FORWARD -j REJECT

COMMIT



All times are GMT -5. The time now is 11:36 AM.