<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: Block Outgoing Network Access For a Single User  Using Iptables</title> <atom:link href="http://www.cyberciti.biz/tips/block-outgoing-network-access-for-a-single-user-from-my-server-using-iptables.html/feed" rel="self" type="application/rss+xml" /><link>http://www.cyberciti.biz/tips/block-outgoing-network-access-for-a-single-user-from-my-server-using-iptables.html</link> <description>This is a Linux sys admin journal by Vivek about sys admin work, Linux tips &#38; tricks, hacks, news and more.</description> <lastBuildDate>Fri, 10 Feb 2012 20:37:43 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: Alex</title><link>http://www.cyberciti.biz/tips/block-outgoing-network-access-for-a-single-user-from-my-server-using-iptables.html#comment-154001</link> <dc:creator>Alex</dc:creator> <pubDate>Sun, 28 Feb 2010 21:37:31 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/block-outgoing-network-access-for-a-single-user-from-my-server-using-iptables.html#comment-154001</guid> <description>David Baron, check your kernel
Networking support -&gt;
Networking options -&gt;
Network packet filtering framework (Netfilter) -&gt;
Core Netfilter Configuration -&gt;
&quot;owner&quot; match support</description> <content:encoded><![CDATA[<p>David Baron, check your kernel<br
/> Networking support -&gt;<br
/> Networking options -&gt;<br
/> Network packet filtering framework (Netfilter) -&gt;<br
/> Core Netfilter Configuration -&gt;<br
/> &#8220;owner&#8221; match support</p> ]]></content:encoded> </item> <item><title>By: David Baron</title><link>http://www.cyberciti.biz/tips/block-outgoing-network-access-for-a-single-user-from-my-server-using-iptables.html#comment-151313</link> <dc:creator>David Baron</dc:creator> <pubDate>Wed, 28 Oct 2009 20:45:05 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/block-outgoing-network-access-for-a-single-user-from-my-server-using-iptables.html#comment-151313</guid> <description>Just what the doctor ordered, but
~$ sudo iptables -A OUTPUT -o eth0 -m owner --uid-owner esti -j DROP
iptables: No chain/target/match by that name.
But there is:
sudo iptables -S &#124; grep OUTPUT
-P OUTPUT DROP
-A OUTPUT -o lo -j ACCEPT
-A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -p icmp -m icmp --icmp-type 3 -j ACCEPT
-A OUTPUT -p icmp -m icmp --icmp-type 11 -j ACCEPT
-A OUTPUT -p icmp -m icmp --icmp-type 12 -j ACCEPT
-A OUTPUT -j s1
I would probably want the -I option but it needs to recognize the chain!
Once it is accepted by iptables, where do I do it: rc.local? ifup (where guarddog configures its iptables rules)?</description> <content:encoded><![CDATA[<p>Just what the doctor ordered, but<br
/> ~$ sudo iptables -A OUTPUT -o eth0 -m owner &#8211;uid-owner esti -j DROP<br
/> iptables: No chain/target/match by that name.</p><p>But there is:<br
/> sudo iptables -S | grep OUTPUT<br
/> -P OUTPUT DROP<br
/> -A OUTPUT -o lo -j ACCEPT<br
/> -A OUTPUT -m state &#8211;state RELATED,ESTABLISHED -j ACCEPT<br
/> -A OUTPUT -p icmp -m icmp &#8211;icmp-type 3 -j ACCEPT<br
/> -A OUTPUT -p icmp -m icmp &#8211;icmp-type 11 -j ACCEPT<br
/> -A OUTPUT -p icmp -m icmp &#8211;icmp-type 12 -j ACCEPT<br
/> -A OUTPUT -j s1</p><p>I would probably want the -I option but it needs to recognize the chain!</p><p>Once it is accepted by iptables, where do I do it: rc.local? ifup (where guarddog configures its iptables rules)?</p> ]]></content:encoded> </item> <item><title>By: Vivek Gite</title><link>http://www.cyberciti.biz/tips/block-outgoing-network-access-for-a-single-user-from-my-server-using-iptables.html#comment-146494</link> <dc:creator>Vivek Gite</dc:creator> <pubDate>Tue, 30 Dec 2008 12:27:05 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/block-outgoing-network-access-for-a-single-user-from-my-server-using-iptables.html#comment-146494</guid> <description>Use following syntax to delete rule:
&lt;pre&gt;iptables  --delete chain rule-specification&lt;/pre&gt;</description> <content:encoded><![CDATA[<p>Use following syntax to delete rule:</p><pre>iptables  --delete chain rule-specification</pre>]]></content:encoded> </item> <item><title>By: sathyashankar</title><link>http://www.cyberciti.biz/tips/block-outgoing-network-access-for-a-single-user-from-my-server-using-iptables.html#comment-146493</link> <dc:creator>sathyashankar</dc:creator> <pubDate>Tue, 30 Dec 2008 12:04:41 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/block-outgoing-network-access-for-a-single-user-from-my-server-using-iptables.html#comment-146493</guid> <description>How do I unblock outgoing network access to a user later point in time?
is there a command that would remove the earlier added rule?</description> <content:encoded><![CDATA[<p>How do I unblock outgoing network access to a user later point in time?<br
/> is there a command that would remove the earlier added rule?</p> ]]></content:encoded> </item> <item><title>By: MT</title><link>http://www.cyberciti.biz/tips/block-outgoing-network-access-for-a-single-user-from-my-server-using-iptables.html#comment-143934</link> <dc:creator>MT</dc:creator> <pubDate>Sat, 31 May 2008 14:38:59 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/block-outgoing-network-access-for-a-single-user-from-my-server-using-iptables.html#comment-143934</guid> <description>correction:
its
iptables -A INPUT -m mac –-mac-source xx:xx:xx:xx:xx:xx -j DROP</description> <content:encoded><![CDATA[<p>correction:</p><p>its</p><p>iptables -A INPUT -m mac –-mac-source xx:xx:xx:xx:xx:xx -j DROP</p> ]]></content:encoded> </item> <item><title>By: MT</title><link>http://www.cyberciti.biz/tips/block-outgoing-network-access-for-a-single-user-from-my-server-using-iptables.html#comment-143933</link> <dc:creator>MT</dc:creator> <pubDate>Sat, 31 May 2008 14:09:12 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/block-outgoing-network-access-for-a-single-user-from-my-server-using-iptables.html#comment-143933</guid> <description>Instead of blocking the IP you can block the mac address of that user&#039;s machine. Else if you allow a range, he might keep trying to change IPs to get access.
iptables -A INPUT -m mac --mac-source xx:xx:xx:xx:xx:xx -j DROP
Note in windows, you will see mac address as
Physical Address. . . . . . . . . : xx-xx-xx-xx-xx-xx
you will have to use : instead of - , while dropping mac address using iptables
You can use  ipscan, to find the mac from any windows machine http://www.hide-windows.com/Download/ipscan.exe for your entire lan, just scan the network.
In linux, you might use ethereal and tcpdump to gather the  mac address of any  other IP, not sure.</description> <content:encoded><![CDATA[<p>Instead of blocking the IP you can block the mac address of that user&#8217;s machine. Else if you allow a range, he might keep trying to change IPs to get access.</p><p>iptables -A INPUT -m mac &#8211;mac-source xx:xx:xx:xx:xx:xx -j DROP</p><p>Note in windows, you will see mac address as</p><p>Physical Address. . . . . . . . . : xx-xx-xx-xx-xx-xx</p><p>you will have to use : instead of &#8211; , while dropping mac address using iptables</p><p>You can use  ipscan, to find the mac from any windows machine <a
href="http://www.hide-windows.com/Download/ipscan.exe" rel="nofollow">http://www.hide-windows.com/Download/ipscan.exe</a> for your entire lan, just scan the network.</p><p>In linux, you might use ethereal and tcpdump to gather the  mac address of any  other IP, not sure.</p> ]]></content:encoded> </item> <item><title>By: Raj</title><link>http://www.cyberciti.biz/tips/block-outgoing-network-access-for-a-single-user-from-my-server-using-iptables.html#comment-142331</link> <dc:creator>Raj</dc:creator> <pubDate>Wed, 02 Jan 2008 08:42:24 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/block-outgoing-network-access-for-a-single-user-from-my-server-using-iptables.html#comment-142331</guid> <description>Ohmster,
Use iptables drop target to drop unwanted IP/ You can also use GUI firewall tool such as Firestarter Linux Firewall  or Webbased tool such as webmin.</description> <content:encoded><![CDATA[<p>Ohmster,</p><p>Use iptables drop target to drop unwanted IP/ You can also use GUI firewall tool such as Firestarter Linux Firewall  or Webbased tool such as webmin.</p> ]]></content:encoded> </item> <item><title>By: Ohmster</title><link>http://www.cyberciti.biz/tips/block-outgoing-network-access-for-a-single-user-from-my-server-using-iptables.html#comment-142324</link> <dc:creator>Ohmster</dc:creator> <pubDate>Tue, 01 Jan 2008 23:00:20 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/block-outgoing-network-access-for-a-single-user-from-my-server-using-iptables.html#comment-142324</guid> <description>This is a neat idea, but I use my Linux box as a router and would like to know how to deny and enable internet access for a single user on my network, the Linux box enables access by ip4v forwarding. I want to deny a particular LAN computer such as 192.168.0.2 and then be able to restore it again. Can you show us how to do that please? I really need this one and iptables is very complicated to try and figure out. Thanks.</description> <content:encoded><![CDATA[<p>This is a neat idea, but I use my Linux box as a router and would like to know how to deny and enable internet access for a single user on my network, the Linux box enables access by ip4v forwarding. I want to deny a particular LAN computer such as 192.168.0.2 and then be able to restore it again. Can you show us how to do that please? I really need this one and iptables is very complicated to try and figure out. Thanks.</p> ]]></content:encoded> </item> <item><title>By: jason</title><link>http://www.cyberciti.biz/tips/block-outgoing-network-access-for-a-single-user-from-my-server-using-iptables.html#comment-19525</link> <dc:creator>jason</dc:creator> <pubDate>Tue, 04 Apr 2006 22:16:00 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/block-outgoing-network-access-for-a-single-user-from-my-server-using-iptables.html#comment-19525</guid> <description>Ya very nice and useful. Just a quick note, if you are using RHEL firewall (GNOME Lokkit or system-config-securitylevel command), type following command shell promot:
&lt;B&gt;# iptables -I OUTPUT -o ethX -m owner --uid-owner oracle -j REJECT&lt;/B&gt;
And save firwall:
&lt;B&gt;# /etc/init.d/iptables save&lt;/B&gt;
Cheers,
Jason.</description> <content:encoded><![CDATA[<p>Ya very nice and useful. Just a quick note, if you are using RHEL firewall (GNOME Lokkit or system-config-securitylevel command), type following command shell promot:<br
/> <b># iptables -I OUTPUT -o ethX -m owner &#8211;uid-owner oracle -j REJECT</b><br
/> And save firwall:<br
/> <b># /etc/init.d/iptables save</b></p><p>Cheers,</p><p>Jason.</p> ]]></content:encoded> </item> </channel> </rss>
