is there a way to configure a firewall with only one nic
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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
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.
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
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.