Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 02-18-2005, 02:13 AM   #1
LQ Newbie
Registered: Feb 2005
Posts: 1

Rep: Reputation: 0
Iptables thingy

Hey guys.. I just updated the firmware of a Linksys router to a hacked one. And I can use iptables to add blocking rules to my network, but the router lacks the feature to block a pc's total internet access save a few domains. So, basically, what I want to do is to block internet access totally to 1 pc except for 2 domain names.. I'm just a newbie at iptables, so could anyone give me a lead ?
Old 02-18-2005, 05:43 AM   #2
Senior Member
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555

Rep: Reputation: 46
$INTIF = eth0

# Flush the chains

#drop all traffic
$IPTABLES -A INPUT -i $INTIF -p tcp -j drop
$IPTABLES -A INPUT -i $INTIF -p udp -j drop
$IPTABLES -A INPUT -i $INTIF -p tcp -j drop

# Allow your 2 destinations

Although I'm not sure you can allow based on a DNS name. I tried to block using a DNS entry, and it wasn't quite succussful. What I've typed would have to be running on the machine you want to restrict


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
Getting there TAR.GZ thingy jymmi Linux - Newbie 9 03-30-2005 10:16 AM
Network thingy Pedroski Linux - Hardware 5 06-13-2004 11:00 AM
i solved the pointing thingy Longinus Programming 5 02-28-2004 03:20 AM
ISP thingy flipboi Linux - Newbie 9 10-24-2003 10:43 PM
< thingy nero64 Linux - Newbie 1 11-28-2002 07:39 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:35 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration