* firewall for linux
@ 2002-03-11 8:57 Ted Lufoma
2002-03-11 12:23 ` Mark Arrasmith
0 siblings, 1 reply; 2+ messages in thread
From: Ted Lufoma @ 2002-03-11 8:57 UTC (permalink / raw)
To: axp-list, redhat-install-list
Hello,
What s the best firewall for linux 6.2.
Any recommendations ?? and if possible send me
the HOW-TO for implementation.
Ted
-------------------
Ted Lufoma e-mail: lufomat@coppernet.zm
CopperNET Solutions URL: www.coppernet.zm
P. O. Box 22149 Tel : 260-2-245087 Fax: 260-2-245734
Kitwe - ZAMBIA.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: firewall for linux
2002-03-11 8:57 firewall for linux Ted Lufoma
@ 2002-03-11 12:23 ` Mark Arrasmith
0 siblings, 0 replies; 2+ messages in thread
From: Mark Arrasmith @ 2002-03-11 12:23 UTC (permalink / raw)
To: axp-list
On Monday 11 March 2002 02:57 am, you wrote:
> Hello,
> What s the best firewall for linux 6.2.
> Any recommendations ?? and if possible send me
> the HOW-TO for implementation.
Create the file /etc/sysconfig/ipchains either with your own script or using
something like lokkit ( http://www.linux.org.uk/apps/lokkit.shtml )
Here is an example that allows access to ssh (port 22) from anywhere,
loopbacks, and dns lookups, but blocks pretty much everything else. Replace
dns addresses with the IP's of the DNS machines you use.
:input ACCEPT
:forward ACCEPT
:output ACCEPT
#this allows ssh, port 22, to get through
-A input -s 0/0 -d 0/0 22 -p tcp -y -j ACCEPT
#this allow lo access
-A input -s 0/0 -d 0/0 -i lo -j ACCEPT
#the next two are for DNS access. Replace the fake IP's with yours.
-A input -s 192.168.1.1 53 -d 0/0 -p udp -j ACCEPT
-A input -s 192.168.1.2 53 -d 0/0 -p udp -j ACCEPT
#the next two reject everything else.
-A input -s 0/0 -d 0/0 -p tcp -y -j REJECT
-A input -s 0/0 -d 0/0 -p udp -j REJECT
Once you have a setup you like, just run . . .
/etc/rc.d/init.d/ipchains restart
and add links to the proper runtime rcx.d directories. You can see the
ipchains running configuration by running . . .
cat /proc/net/ip_fwchains
other examples:
#allow ssh only from 192.168. networks . . .
-A input -s 192.168.0.0/255.255.0.0 -d 0/0 22 -p tcp -y -j ACCEPT
#allow http access from anywhere
-A input -s 0/0 -d 0/0 80 -p tcp -y -j ACCEPT
#allow all ethernet traffic on eth0 from the 192.168.12. network . . .
-A input -s 192.168.12.0/255.255.255.0 -d 0/0 -i eth0 -j ACCEPT
Hope this helps. Make sure you have physical access to the machine in case
your rules don't allow you to access the machine remotely.
- mark arrasmith
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-03-11 12:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-11 8:57 firewall for linux Ted Lufoma
2002-03-11 12:23 ` Mark Arrasmith
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox