LinuxQuestions.org
Help answer threads with 0 replies.
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, 09: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, 09: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 09:22 AM.
 
Old 09-12-2004, 09: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, 09: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, 10: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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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

All times are GMT -5. The time now is 10:31 PM.

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