LinuxQuestions.org
Visit Jeremy's Blog.
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 10-12-2011, 09:54 AM   #1
baronobeefdip
Senior Member
 
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 1,267

Rep: Reputation: 32
is there a way to configure a firewall with only one nic


we are working on a project in my networking class and we are trying to figure out how to create a box running a firewall and only has one nic card instead of two, it's all over the internet but i haven't found the proper terminology for what we are trying to do (what is it called) and how to configure it to work on our lan

it can be in either a BSD distro or a Linux distro it doesn't mater but we all are focused on linux but it won't hurt to explore BSD as well
 
Old 10-12-2011, 10:08 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
yes it's totally possible. I doubt you'd find anything specific about this though, as what you're asking for information about doesn't seem specifically interesting / unique. you just configure iptables to suit your needs (assuming it's linux).

Obviously the idea of a one leg firewall is a little strange though, maybe if you describe the reasons and environment more it'd be clearer what you really mean? Are you talking about vlan separation? If so, that certainly makes a lot more sense.
 
Old 10-12-2011, 10:48 AM   #3
baronobeefdip
Senior Member
 
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 1,267

Original Poster
Rep: Reputation: 32
well i guess we will be working with iptables but how do i set ip tables to only control packet flow through one interface instead of allowing traffic to go through a bridged interface from one nic to the other instead we want it to control the traffic with only one nic card. i can understand why it's of no interest to the networking community since it doesn't seem ideal to use a firewall with only one nic since it slows traffic but correct me if I'm wrong about that.

i have absolutely no idea why everyone wants to do this maybe for educational purposes or to show off our abilities as a cyber defense team. either way i don't see interest in it either but i do appreciate the help i have been receiving about this project
 
Old 10-12-2011, 01:55 PM   #4
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
Again, there's not "no interest" it's just not technically interesting. there is nothing specific about your requirements to deserve any specific discussion about. if you only want to apply firewall rules to a single interface, then make your iptables rules specific to that interface etc. What you want appears to just be normal, straightforward and boring. Or am I still missing something?

You mentioned bridging and it's pretty confusing to work out what you mean, but I don't *think* you mean bridging in any way, just an internal and external nic? again, nothing interesting there, just a server doing its thing.

Last edited by acid_kewpie; 10-12-2011 at 01:57 PM.
 
Old 10-12-2011, 03:18 PM   #5
baronobeefdip
Senior Member
 
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 1,267

Original Poster
Rep: Reputation: 32
forget i metioned bridging, i am only interested in using a firewall box to control the packets and traffic on the entire LAN with only one nic. how do i get ip tables to control traffic on the entire LAN instead of controlling traffic that leaves and enters the system it's installed on
 
Old 10-12-2011, 03:30 PM   #6
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
Ooooh, you want to use iptables to protect traffic within a single switched subnet? that's impossible (or rather, is as the level we're working at). switched networking means that network ports only see traffic relevant to them. with three machines, a, b and c, it a talks to b using tcp then c will never have any idea whatsoever. Am I getting it now? If you want to filter a subnet then bridging would be the way that is done, making a layer 2 firewall, and with a single nic, that'd have to be done using vlans and an appropriately capable switch. You can haves ids systems which can monitor a mirror of the network traffic and spoof resets and arp responses and the likes to interfere with traffic flows, but this is not firewalling at all.

Last edited by acid_kewpie; 10-12-2011 at 03:31 PM.
 
Old 10-12-2011, 03:37 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
The two way's I'd use would be to create a second IP address on that nic (if it supports it and almost all do). Then it would be as if it has a second nic to the admin basically.

Second way would be to use a virtual machine firewall distro. Run all io into and out of it.
 
Old 10-12-2011, 09:32 PM   #8
baronobeefdip
Senior Member
 
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 1,267

Original Poster
Rep: Reputation: 32
that first option sounds like what everyone wants to do
 
Old 05-10-2012, 04:07 PM   #9
baronobeefdip
Senior Member
 
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 1,267

Original Poster
Rep: Reputation: 32
I am not dealing with VLANs, simply i want to "bridge" packets between the router and everything connected to the switch with a single nix and the computer doing the bridging is functioning as a firewall in addition to the bridging. what kind of bridging is this called. if it even exists.
 
Old 05-11-2012, 02:21 AM   #10
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
without multiple nics or vlans it's not possible, as the traffic would already be on the right network, so couldn't be bridged through any additional device.
 
  


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
Firewall NIC problems sigma_50 Linux - Networking 12 08-03-2007 09:25 AM
NIC-Firewall-NIC I can't make it work! Z8002 Linux - Networking 3 06-28-2005 05:29 PM
how to configure firewall on single nic RajaRC Linux - Networking 3 10-15-2004 06:16 AM
freebsd firewall, second nic problem jedimastermopar *BSD 6 10-13-2004 10:42 PM
Proxy and firewall on Slackware with two NIC Retrievil_Knievil Linux - Networking 14 04-14-2004 02:49 PM

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

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