LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 05-14-2004, 06:45 PM   #1
Obie
Member
 
Registered: Apr 2004
Distribution: Red Hat
Posts: 290

Rep: Reputation: 30
Question How to block?


Hi All,

I wish to run a Linux Firewall for my small home network. I have a machine that runs Windows as well. I was wondering if it possible via the Linux Firewall to block Internet Access to programs akin to Symantec's "Program Block" or "Program Scan". How do I achieve this? Also which Firewall is best to use? I know Checkpoint is extremely good however would like a similar alternative which is free.
 
Old 05-14-2004, 08:37 PM   #2
Bruce Ma
LQ Newbie
 
Registered: Apr 2004
Location: Internet
Distribution: gentoo
Posts: 8

Rep: Reputation: 0
Which port do u want to block ?!

What did u want to do ? To blcok some port or block some program to access Internet !?
 
Old 05-14-2004, 09:19 PM   #3
Obie
Member
 
Registered: Apr 2004
Distribution: Red Hat
Posts: 290

Original Poster
Rep: Reputation: 30
Both. I wish to block Ports as well as Programs that access the internet
 
Old 05-14-2004, 10:29 PM   #4
Bruce Ma
LQ Newbie
 
Registered: Apr 2004
Location: Internet
Distribution: gentoo
Posts: 8

Rep: Reputation: 0
I can't understand !

Did u want to block the Windows for all internet access ?!
Did u want to only the Linux to accesss the Internet ?!
if u have configure the MASQUERADE , run command following from Linux :
iptables -t nat -A PREROUTING -i ppp0 -o eth0 -j DROP
ppp0: ur Internet interface on Linux .
eth0: ur local interface on the Linux to connect the Windows !

If u have not to configure the MASQUERADE , ur Windows has already can't access the Internet !

Last edited by Bruce Ma; 05-14-2004 at 10:35 PM.
 
Old 05-14-2004, 11:29 PM   #5
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Re: I can't understand !

Quote:
Originally posted by Bruce Ma
if u have configure the MASQUERADE , run command following from Linux :
iptables -t nat -A PREROUTING -i ppp0 -o eth0 -j DROP
[/B]
Probably would be better to just remove the Masquerade rule entirely, rather than masquerading and then dropping the prerouted traffic (technically you really shouldn't be packet filtering in the nat table anyway). At the very least block it in the Forwarding chains instead.

Obie:
In general to block any kind of lan traffic (ports/programs):

iptables -I FORWARD -p tcp --dport XX -j REJECT --reject-with icmp-port-unreachable

where XX is the port number used by the program. Alot of times you'll see people drop this traffic entirely, but then the LAN clients will get annoying application hangs where the app just sits there and tries to re-send packets untill a timeout is reached, thereby generating un-necessary traffic. If you are really annoyed with the user in question, maybe dropping is what you would like to do after all
 
Old 05-15-2004, 12:09 AM   #6
Obie
Member
 
Registered: Apr 2004
Distribution: Red Hat
Posts: 290

Original Poster
Rep: Reputation: 30
Question How do I know?

Thank you all for your quick responses. I would like to allow Internet access to the Internet on my Windows machine. This is what I would like to do. Setup a Linux firewall. Have my Windows machine sit behind the firewall. Allow common ports e.g. 80, 443, 21, 25, 110. Now I also wish to block access to the Internet to all software except say my browser, etc. How do I know which ports the software use?

Also unanswered was my query, which Linux firewall is recommended?

Appreciate all your help.

Obie
 
Old 05-15-2004, 12:27 AM   #7
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Re: How do I know?

Thank you all for your quick responses. I would like to allow Internet access to the Internet on my Windows machine.
Have you set up some kind of internet connection sharing already?

How do I know which ports the software use?
Check /etc/services or the software documentation.

Also unanswered was my query, which Linux firewall is recommended?
I would recommend iptables, which should be include with most recent versions of linux.
 
  


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
block public ip space_beyond Linux - Security 6 06-04-2005 08:23 AM
IPTables and PPTPD :S (to block or not to block) thewonka Linux - Networking 0 03-24-2005 06:58 PM
help me block an ip Zac2003 Linux - Security 1 11-03-2004 09:48 PM
block-major-8 xbaez Red Hat 0 05-27-2004 11:13 PM
how to block an ip porous Linux - Security 2 10-13-2003 02:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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