LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 11-12-2010, 06:19 PM   #1
sparkey
LQ Newbie
 
Registered: Nov 2010
Posts: 11

Rep: Reputation: 0
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] /etc/network/interfaces configuration for virtual interfaces nonshatter Linux - Networking 4 10-25-2010 06:22 AM
Help with virtual interfaces swordphsh Linux - Networking 5 09-16-2008 01:19 PM
eth0 virtual interfaces & iptables Jukas Linux - Networking 2 07-27-2006 12:13 PM
iptables and virtual interfaces redhat_help Linux - Security 2 03-19-2006 03:24 PM
Virtual Interfaces da_tibmeister Linux - Networking 2 10-15-2003 09:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 10:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration