LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Closed Thread
  Search this Thread
Old 12-03-2015, 09:45 AM   #1
paul2015
Member
 
Registered: Apr 2015
Distribution: CentOS Fedora
Posts: 149

Rep: Reputation: 4
iptables, zones and traffic management


hello everyone

I have question about creating iptables zones and managing traffic with zones. In my example does that mean that in IZONE only accepts traffic from the external interface "eth0" and sends to it? and do I need to define any more: "iptables -A IZONE -i eth0" and "iptables -A IZONE -o eth0"


Example:

IP address:
eth0/192.168.1.100

Interfaces:
eth0 - external interface
eth1 - internal interface

#!/bin/bash

iptables -F
iptables -F -t nat
iptables -F -t mangle
iptables -X
iptables -X -t nat
iptables -X -t mangle
iptables -Z

iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP

iptables -N IZONE
iptables -N LZONE

iptables -A INPUT -i eth0 -j IZONE
iptables -A OUTPUT -o eth0 -j IZONE

iptables -A INPUT -i eth1 -j LZONE
iptables -A OUTPUT -o eth1 -j LZONE

iptables -A IZONE -p tcp -s 192.168.1.100 -d 8.8.8.8 --dport 53 -m conntrack --ctstate \
NEW,ESTABLISHED -j ACCEPT
iptables -A IZONE -p tcp -s 8.8.8.8 -d 192.168.1.100 --dport 53:65535 -m conntrack --ctstate \
ESTABLISHED -j ACCEPT

iptables -A IZONE -p tcp -s 192.168.1.100 -d 0/0 --dport 80 -m conntrack --ctstate \
NEW,ESTABLISHED -j ACCEPT
iptables -A IZONE -p tcp -s 0/0 -d 192.168.1.100 --dport 80:65535 -m conntrack --ctstate \
ESTABLISHED -j ACCEPT


Thank you
 
Old 12-03-2015, 09:56 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,842

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
duplicate of https://www.linuxquestions.org/quest...nt-4175560528/
 
Old 12-03-2015, 10:18 AM   #3
paul2015
Member
 
Registered: Apr 2015
Distribution: CentOS Fedora
Posts: 149

Original Poster
Rep: Reputation: 4
how to delete post from here?
 
Old 12-03-2015, 10:41 AM   #4
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by paul2015 View Post
how to delete post from here?
you don't.
 
Old 12-03-2015, 03:11 PM   #5
paul2015
Member
 
Registered: Apr 2015
Distribution: CentOS Fedora
Posts: 149

Original Poster
Rep: Reputation: 4
oh so sad
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Solaris 10 with zones, outbound Internet traffic blocked. HElP! Ben99 Solaris / OpenSolaris 7 04-04-2011 03:25 PM
zones and Resource Management under Opensolaris? your_shadow03 Solaris / OpenSolaris 5 07-10-2009 03:17 AM
[HELP] redirect traffic to spesific port based on Traffic Content using iptables summersgone Linux - Server 2 06-22-2009 11:26 AM
Traffic management priyadarshan Linux - Newbie 5 03-30-2009 09:38 AM
Linux based Firewall OS with traffic management filips01 Linux - Networking 2 04-14-2007 07:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:06 AM.

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