Re: Do I have to enable bridge if I want to make Linux box as Router (4-port NIC for local LAN and 1-port NIC for WAN)?
From: Bill Davidsen (davidsen_at_deathstar.prodigy.com)
Date: 08/04/05
- Next message: Bill Davidsen: "Re: programing c with fedora core 3"
- Previous message: No_One: "Re: programing c with fedora core 3"
- In reply to: GS: "Do I have to enable bridge if I want to make Linux box as Router (4-port NIC for local LAN and 1-port NIC for WAN)?"
- Next in thread: GS: "Re: Do I have to enable bridge if I want to make Linux box as Router (4-port NIC for local LAN and 1-port NIC for WAN)?"
- Reply: GS: "Re: Do I have to enable bridge if I want to make Linux box as Router (4-port NIC for local LAN and 1-port NIC for WAN)?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 04 Aug 2005 19:36:35 GMT
GS wrote:
> Do I have to enable bridge if I want to make Linux box (PC) as Router
> (4-port NIC for local LAN and 1-port NIC for WAN)?. I have two NIC
> cards, one is 4-port NIC card which is to connect all four local PC's
> for Net connection and one port NIC connected to DSL/Cable MOdem. Do I
> have to enable Bridge?. In this case how do I have to name the ethernet
> ports, like eth0, eth1, eth2......eth4?.
>
> Also if I want to access the Router over the LAN to configure the
> Router parameters, do I have to connect one more NIC or Is there any
> alternative way is there?.
Unless you really need to do a lot of packet limiting to individual
machines, you would be well off to just use a switch and not need to
manage five NICs. You don't need or want bridge, you want each machine
to have a private IP address, like 192.168.1.xxx (xxx range 1..254).
Then you set you main machine to MASQUERADE packets from the internal
NIC(s) to the outside world, so only the correct ISP provided IP address
shows.
You want the iptables policy to reject everything in the INPUT stream,
then allow only what you really want to pass. As a start, I make the
first (most often used) rule to accept anything established or related.
Then you accept as little as possible from the internal machines, only
things like http, maybe mail (smtp) connections to your provider's
outbound mailer, etc. If you use chat or similar you need to open that,
but ONLY if you initiate it from you inside machines.
Unless you want to run servers, you want to drop everything except
established tcp and maybe udp sockets. *Maybe* you allow ping, if you
must. You have to turn on the forwarding flag in /proc/sys/net/ipv4 so
your protected machines can talk to the outside world.
Never use telnet connections, they can be sniffed and are in clear text.
Set up ssh and use that instead, change the config file (usually
/etc/ssh/sshd_config) to allow protocol two only, you will see something
like "2,1" and should replace it with just "2" because there are
weaknesses in protocol one.
To allow incoming connections, definitely use redirect so the connect
comes in on a port other than the ssh (22) port. People *will* probe all
the standard orts. If you know what IP or range of IPs you will use,
only allow connect from them.
Being secure is a fair bit of work, there are some canned solutions out
there which will do much of it for you. I hear all good things about
"Astaro Security Linux" so that's a possible, but there are others.
Needless to say, to be secure it takes a lot more work than just
plugging the wires and running. Take backups, try not to leave critical
stuff like passwords and account numbers on machines.
-- bill davidsen SBC/Prodigy Yorktown Heights NY data center http://newsgroups.news.prodigy.com
- Next message: Bill Davidsen: "Re: programing c with fedora core 3"
- Previous message: No_One: "Re: programing c with fedora core 3"
- In reply to: GS: "Do I have to enable bridge if I want to make Linux box as Router (4-port NIC for local LAN and 1-port NIC for WAN)?"
- Next in thread: GS: "Re: Do I have to enable bridge if I want to make Linux box as Router (4-port NIC for local LAN and 1-port NIC for WAN)?"
- Reply: GS: "Re: Do I have to enable bridge if I want to make Linux box as Router (4-port NIC for local LAN and 1-port NIC for WAN)?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|