LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 09-12-2004, 08:12 AM   #1
frank2
LQ Newbie
 
Registered: Dec 2003
Posts: 14

Rep: Reputation: 0
iptables, block port 80?


Hi.

I want to block port 80 (outgoing) from all pc-s except frmo only one pc (my proxy-server). is this possible? and how is it done? i've read the documentation i could find.
 
Old 09-12-2004, 08:20 AM   #2
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
you can

iptables -A INPUT -p tcp -i <internal NIC> -s ! <your IP> --dport 80 -j REJECT
iptables -A INPUT -p tcp -i <internal NIC> -s <your IP> --dport 80 -j ACCEPT

OR

You can set rules on your proxy server to accept connections only from your pc

Last edited by ppuru; 09-12-2004 at 08:22 AM.
 
Old 09-12-2004, 08:30 AM   #3
frank2
LQ Newbie
 
Registered: Dec 2003
Posts: 14

Original Poster
Rep: Reputation: 0
i dont't think i expressed my self good enough.

well.

i want to block it on my router running iptables.
proxy are on another server.

i do only want to accept outgoing frmo my proxy.
 
Old 09-12-2004, 08:48 AM   #4
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
iptables -A FORWARD -p tcp -i <internal NIC> -s ! <your IP> --dport 80 -j REJECT
 
Old 09-12-2004, 09:14 AM   #5
frank2
LQ Newbie
 
Registered: Dec 2003
Posts: 14

Original Poster
Rep: Reputation: 0
ah, this works great forcing everybody use proxy, thanks guys
 
  


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
How can I block all traffic to port 110 to and IP using IPtables? abefroman Linux - Networking 8 11-16-2005 07:26 PM
Iptables help, block port to outside but open to inside. Brian1 Linux - Networking 2 09-27-2005 08:41 PM
IPTables and PPTPD :S (to block or not to block) thewonka Linux - Networking 0 03-24-2005 06:58 PM
Block incoming port Iptables cli_man Linux - Networking 5 08-11-2003 08:32 PM
iptables - howto block by a port and IP address -HELP! macnanc Linux - Networking 2 03-07-2003 04:45 AM

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

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