LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-22-2007, 08:11 AM   #1
vsoemlio
LQ Newbie
 
Registered: May 2007
Location: Norway
Distribution: Debian
Posts: 11

Rep: Reputation: 0
Disallow IP to access WAN


how do I disallow an IP on my network to access the Internett? I use iptables and Debian.
 
Old 05-22-2007, 03:25 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Are you looking for rules to put in a firewall? If yes

Code:
iptables -I FORWARD --source 192.168.xx.xx -j DROP
should get pretty close. Use the appropriate IP.
--- rod.
 
Old 05-22-2007, 04:08 PM   #3
vsoemlio
LQ Newbie
 
Registered: May 2007
Location: Norway
Distribution: Debian
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks, but how do I remove it again ?
 
Old 05-22-2007, 04:24 PM   #4
Brad.Scalio@noaa.gov
Member
 
Registered: Jan 2007
Location: Washington DC
Distribution: RedHat & spins ... Fedora, CentOS, Mandriva
Posts: 82

Rep: Reputation: 15
Quote:
Originally Posted by vsoemlio
Thanks, but how do I remove it again ?

I would use Reject instead of Drop and use the INPUT table instead, but just a preference, regardless that should work, to drop the rule:

Code:
iptables -nvL --line-numbers
then see what the line number of the rule you want to delete

Code:
iptables -D FORWARD # (where # is the line number reported by above command)

Last edited by Brad.Scalio@noaa.gov; 05-22-2007 at 04:25 PM.
 
Old 05-22-2007, 04:31 PM   #5
vsoemlio
LQ Newbie
 
Registered: May 2007
Location: Norway
Distribution: Debian
Posts: 11

Original Poster
Rep: Reputation: 0
Oh thank you. It works
 
  


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
Access workgroupPCs on wan ? ALInux Linux - Networking 1 01-23-2006 11:22 AM
can't access ssh on wan wazilian Linux - Networking 0 06-02-2005 02:12 PM
FreeS/Wan Vs. OpenS/Wan Vs. StrongS/Wan bkankur Linux - Security 1 03-01-2005 09:27 AM
redhat 7.3 can only access LAN, not WAN ForumKid Linux - Networking 1 08-01-2004 08:14 AM
telnet: DISallow root access MacDschie Linux - Software 2 05-14-2003 12:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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