LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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


Reply
  Search this Thread
Old 09-22-2012, 07:52 AM   #1
onlybrybry
LQ Newbie
 
Registered: Sep 2012
Posts: 3

Rep: Reputation: Disabled
need help with routing to firewall only from vlans


I am working on a project that deals with a hotel/condo so we are working with VLAN tagging, a switch and CentOS. Our goal is to route traffic from VLAN100 and VLAN101 to the firewall only which of course is the internet. We don't want VLAN101 to route to anything else on VLAN1, just the firewall. We don't want VLAN100 and VLAN101 to pass traffic to each other as those would be the different offices. There will eventually 50 VLANs between 3 switches; 1 switch per floor.

IP forwarding is OFF in sysctl.sys so we accomplished the goal of not passing traffic between the VLAN. We can ping from VLAN101 the CentOS ETH0 and ETH0.101 interface. And of course nothing passes between anything else.

My question, what route add or ip route or ip rule do we add in CentOS that would meet our goal of just reaching the firewall and nothing else on VLAN1 from the other VLANs?

Thanks in advance.

-Bryan

VLAN101 <<--->> Firewall only
VLAN102 <<--->> Firewall only
VLAN101 //---// VLAN102

VLAN1 is 192.168.1.0 (port 23/24 trunk on the switch)
VLAN101 is 192.168.50.0 (port 1 on the switch)
VLAN102 is 192.168 51.0 (port 2 on the switch)

The firewall is on 192.168.1.254. There is a route on the firewall 192.168.50.0 to 192.168.1.240.

CentOS interfaces
ETH0 is on 192.168.1.240.
ETH0.101 is 192.168.50.1
ETH0.102 is 192.168.51.1
 
Old 09-24-2012, 05:19 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
be careful not to think vlans are more than they actually are. Inside your system, ignore vlans. You have some interfaces which will tag traffic leaving it with 802.1q headers, but that's irrelevant to the internals of your system.

Routing is not to restrict anything, but enable it. You would enable routing generically (which would be enabling ip_foward and probably no actual route changes at all as everything is local to the box, so implicitly routed) and then filter traffic flows you do not wish to permit using iptables.
 
Old 09-24-2012, 10:42 AM   #3
onlybrybry
LQ Newbie
 
Registered: Sep 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thanks. That is what I suspected and you have confirmed it. I am now using iptables. I'll create another topic for the iptable statement that is throwing me off.

Bryan
 
  


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
A quick question about VLANs and routing djuro-san Linux - Networking 1 09-01-2008 08:11 PM
Firewall/Routing Question redneonrt Linux - Networking 6 02-08-2008 10:38 PM
Firewall routing by hostname - possible? jread Linux - Networking 3 09-16-2005 11:34 AM
Firewall Routing trent000 SUSE / openSUSE 1 07-19-2005 11:17 AM
Firewall, Routing and Subnets - is this possible? donoss Linux - Networking 2 10-28-2004 12:34 PM

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

All times are GMT -5. The time now is 07:10 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