<?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: Iptables MAC Address Filtering</title> <atom:link href="http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html/feed" rel="self" type="application/rss+xml" /><link>http://www.cyberciti.biz/tips/iptables-mac-address-filtering.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: Dert</title><link>http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-175094</link> <dc:creator>Dert</dc:creator> <pubDate>Sat, 22 Oct 2011 01:07:12 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-175094</guid> <description>Jim, i think no because i haven&#039;t found in man special mac-adress diapason system support (like for IP-adresses)</description> <content:encoded><![CDATA[<p>Jim, i think no because i haven&#8217;t found in man special mac-adress diapason system support (like for IP-adresses)</p> ]]></content:encoded> </item> <item><title>By: Jim</title><link>http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-173570</link> <dc:creator>Jim</dc:creator> <pubDate>Fri, 26 Aug 2011 21:41:39 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-173570</guid> <description>Is it possible to block all MACs except a range?  For example, I want to allow all devices from a specific manufacturer such as 11.22.33.00.00.00 through 11.22.33.FF.FF.FF?</description> <content:encoded><![CDATA[<p>Is it possible to block all MACs except a range?  For example, I want to allow all devices from a specific manufacturer such as 11.22.33.00.00.00 through 11.22.33.FF.FF.FF?</p> ]]></content:encoded> </item> <item><title>By: Madhab</title><link>http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-171768</link> <dc:creator>Madhab</dc:creator> <pubDate>Mon, 06 Jun 2011 14:28:21 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-171768</guid> <description>Hi,
I wanna block internet some computer PC with mac address  which rule can do it</description> <content:encoded><![CDATA[<p>Hi,</p><p>I wanna block internet some computer PC with mac address  which rule can do it</p> ]]></content:encoded> </item> <item><title>By: Andy</title><link>http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-170532</link> <dc:creator>Andy</dc:creator> <pubDate>Fri, 08 Apr 2011 18:59:59 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-170532</guid> <description>Can I use this tutorial to create a MAC filter between a wireless network switch and the core? I need access to the network resources so I can&#039;t use a router. What would you suggest?</description> <content:encoded><![CDATA[<p>Can I use this tutorial to create a MAC filter between a wireless network switch and the core? I need access to the network resources so I can&#8217;t use a router. What would you suggest?</p> ]]></content:encoded> </item> <item><title>By: raj</title><link>http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-156667</link> <dc:creator>raj</dc:creator> <pubDate>Thu, 17 Jun 2010 10:59:09 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-156667</guid> <description>Hi,
I want to block all MAC address except 1. Any clue.
I do not want to block TCP or UDP Traffic at all.
Thanks</description> <content:encoded><![CDATA[<p>Hi,</p><p>I want to block all MAC address except 1. Any clue.</p><p>I do not want to block TCP or UDP Traffic at all.</p><p>Thanks</p> ]]></content:encoded> </item> <item><title>By: Tawfiq</title><link>http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-155981</link> <dc:creator>Tawfiq</dc:creator> <pubDate>Wed, 12 May 2010 04:35:00 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-155981</guid> <description>is it possible to put the info in a separate file and call it from your main firewall script?
lets say, there is a file called /root/scripts/ip-mac-list
where u have the info written as,
[code] 192.168.0.1 00:13:xx:xx:xx:xx
[/code]</description> <content:encoded><![CDATA[<p>is it possible to put the info in a separate file and call it from your main firewall script?<br
/> lets say, there is a file called /root/scripts/ip-mac-list<br
/> where u have the info written as,<br
/> [code] 192.168.0.1 00:13:xx:xx:xx:xx<br
/> [/code]</p> ]]></content:encoded> </item> <item><title>By: zazuge</title><link>http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-154543</link> <dc:creator>zazuge</dc:creator> <pubDate>Fri, 26 Mar 2010 14:41:27 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-154543</guid> <description>to Zohaib Hussain
if you have a proxy server then use password authentication
better if you have a managed switch
statically fix the ip address and MAC for every switch port
that way the only way to access the network is to use a certain IP address with the Original MAC address of the NIC while plugged to the correct switch port
and i don&#039;t think that there is any way around this
check also VLAN</description> <content:encoded><![CDATA[<p>to Zohaib Hussain<br
/> if you have a proxy server then use password authentication<br
/> better if you have a managed switch<br
/> statically fix the ip address and MAC for every switch port<br
/> that way the only way to access the network is to use a certain IP address with the Original MAC address of the NIC while plugged to the correct switch port<br
/> and i don&#8217;t think that there is any way around this<br
/> check also VLAN</p> ]]></content:encoded> </item> <item><title>By: Robert</title><link>http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-154511</link> <dc:creator>Robert</dc:creator> <pubDate>Wed, 24 Mar 2010 17:02:15 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-154511</guid> <description>Zohaib,
Sorry to say this but using Mac address filtering to control access to your network is like using a locked screen door to control access to your house.  It keeps the generally honest out but doesn&#039;t stop those who&#039;s motives are less than pure.  It&#039;s a good general backup to the main security, but it is not a main security measure in and off itself.  We use passwords and Mac filtering. Mac Address filtering makes it harder to use a stolen or hacked password.</description> <content:encoded><![CDATA[<p>Zohaib,</p><p>Sorry to say this but using Mac address filtering to control access to your network is like using a locked screen door to control access to your house.  It keeps the generally honest out but doesn&#8217;t stop those who&#8217;s motives are less than pure.  It&#8217;s a good general backup to the main security, but it is not a main security measure in and off itself.  We use passwords and Mac filtering. Mac Address filtering makes it harder to use a stolen or hacked password.</p> ]]></content:encoded> </item> <item><title>By: Zohaib Hussain</title><link>http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-153844</link> <dc:creator>Zohaib Hussain</dc:creator> <pubDate>Mon, 22 Feb 2010 06:22:20 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-153844</guid> <description>Dear All,
please help me i have different prb facing i m running LAN network with LInux i m facing the prb of mac spoofing but some of users whom i blocked by my server they user mac address changer different softwares and by this software they detect any Online Active user mac address and just change the IP Address and use internet and when i try to block that mac address by iptables but i cant block that mac address because its mine online active users mac and who users blocked the connection of my LAN they do these things and use mac address changing software and get solid and valid legal mac address by network scanning. .... what i do i m much confused</description> <content:encoded><![CDATA[<p>Dear All,</p><p>please help me i have different prb facing i m running LAN network with LInux i m facing the prb of mac spoofing but some of users whom i blocked by my server they user mac address changer different softwares and by this software they detect any Online Active user mac address and just change the IP Address and use internet and when i try to block that mac address by iptables but i cant block that mac address because its mine online active users mac and who users blocked the connection of my LAN they do these things and use mac address changing software and get solid and valid legal mac address by network scanning. &#8230;. what i do i m much confused</p> ]]></content:encoded> </item> <item><title>By: Atheya</title><link>http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-151417</link> <dc:creator>Atheya</dc:creator> <pubDate>Mon, 02 Nov 2009 00:50:22 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-151417</guid> <description>How do I execute this Perl script?</description> <content:encoded><![CDATA[<p>How do I execute this Perl script?</p> ]]></content:encoded> </item> <item><title>By: Vivek Gite</title><link>http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-148014</link> <dc:creator>Vivek Gite</dc:creator> <pubDate>Mon, 06 Apr 2009 14:19:17 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-148014</guid> <description>Thanks for sharing perl script.</description> <content:encoded><![CDATA[<p>Thanks for sharing perl script.</p> ]]></content:encoded> </item> <item><title>By: Lillholm</title><link>http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-148009</link> <dc:creator>Lillholm</dc:creator> <pubDate>Mon, 06 Apr 2009 12:30:35 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-148009</guid> <description>Coop&gt;
Here is a script i use to write my iptables.
&lt;pre&gt;#!/usr/bin/perl
use DBI;
$sql_user			= &quot;dhcpd&quot;;
$sql_password			= &quot;*******&quot;;
$sql_database			= &quot;dhcpd&quot;;
$sql_hostname			= &quot;localhost&quot;;
$sql_port			= &quot;3306&quot;;
$dsn		= &quot;DBI:mysql:database=$sql_database;host=$sql_hostname;port=$sql_port&quot;;
print &quot;-----------------------------------------------\n&quot;;
print &quot;      Building iptables config from mysql      \n&quot;;
print &quot;-----------------------------------------------\n&quot;;
print &quot;Getting information from  mysql database...&quot;;
$dbh = DBI-&gt;connect($dsn, $sql_user, $sql_password);
$getmac = $dbh-&gt;prepare(&quot;select mac from trusted order by ip&quot;);
$getip = $dbh-&gt;prepare(&quot;select ip from trusted order by ip&quot;);
$getmac-&gt;execute;
$getip-&gt;execute;
print &quot;Done\n&quot;;
print &quot;Creating temp file...&quot;;
#print `rm iptables.conf.temp`;
open (CONFIGFILE, &#039;&gt;&gt;iptables.conf.temp&#039;);
print &quot;Done\n&quot;;
print &quot;Start writing configfile...\n-----------------------------------------------\n&quot;;
$count 		= 0;
while ( @getmac = $getmac-&gt;fetchrow_array, @getip = $getip-&gt;fetchrow_array ) {
@mac[$count] = @getmac;
@ip[$count] = @getip;
$count++;
}
$dbh-&gt;disconnect;
$count = 0;
foreach (@mac) {
print CONFIGFILE &quot;iptables -A INPUT -p tcp -s @ip[$count] -m mac --mac-source @mac[$count] -j ACCEPT
&quot; . 			 &quot;&quot;;
$count++;
print &quot;iptables -A INPUT -p tcp -s @ip[$count] -m mac --mac-source @mac[$count] -j ACCEPT&quot; . &quot;\n&quot;;
}
close (CONFIGFILE);
print &quot;-----------------------------------------------\nDone.\n&quot;;
print `mv iptables.conf.temp iptables.conf`;
sleep(1);
#print `echo &quot;do somthing here :)&quot;`&lt;/pre&gt;
I also made one for dhcpd so unknown mac&#039;s logging on my wireless will be in a diffrent subnet.</description> <content:encoded><![CDATA[<p>Coop&gt;<br
/> Here is a script i use to write my iptables.</p><pre>#!/usr/bin/perl
use DBI;
$sql_user			= "dhcpd";
$sql_password			= "*******";
$sql_database			= "dhcpd";
$sql_hostname			= "localhost";
$sql_port			= "3306";
$dsn		= "DBI:mysql:database=$sql_database;host=$sql_hostname;port=$sql_port";
print "-----------------------------------------------\n";
print "      Building iptables config from mysql      \n";
print "-----------------------------------------------\n";
print "Getting information from  mysql database...";
$dbh = DBI-&gt;connect($dsn, $sql_user, $sql_password);
$getmac = $dbh-&gt;prepare("select mac from trusted order by ip");
$getip = $dbh-&gt;prepare("select ip from trusted order by ip");
$getmac-&gt;execute;
$getip-&gt;execute;
print "Done\n";
print "Creating temp file...";
#print `rm iptables.conf.temp`;
open (CONFIGFILE, '&gt;&gt;iptables.conf.temp');
print "Done\n";
print "Start writing configfile...\n-----------------------------------------------\n";
$count 		= 0;
while ( @getmac = $getmac-&gt;fetchrow_array, @getip = $getip-&gt;fetchrow_array ) {
    @mac[$count] = @getmac;
    @ip[$count] = @getip;
    $count++;
}
$dbh-&gt;disconnect;
$count = 0;
foreach (@mac) {
	print CONFIGFILE "iptables -A INPUT -p tcp -s @ip[$count] -m mac --mac-source @mac[$count] -j ACCEPT
" . 			 "";
	$count++;
	print "iptables -A INPUT -p tcp -s @ip[$count] -m mac --mac-source @mac[$count] -j ACCEPT" . "\n";
}
close (CONFIGFILE);
print "-----------------------------------------------\nDone.\n";
print `mv iptables.conf.temp iptables.conf`;
sleep(1);
#print `echo "do somthing here :)"`</pre><p>I also made one for dhcpd so unknown mac&#8217;s logging on my wireless will be in a diffrent subnet.</p> ]]></content:encoded> </item> <item><title>By: Vivek Gite</title><link>http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-147865</link> <dc:creator>Vivek Gite</dc:creator> <pubDate>Thu, 26 Mar 2009 16:07:59 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-147865</guid> <description>I don&#039;t think so.. you need to take help of perl or python and send those IPs using system or exec or `` call to iptables.</description> <content:encoded><![CDATA[<p>I don&#8217;t think so.. you need to take help of perl or python and send those IPs using system or exec or &#8220; call to iptables.</p> ]]></content:encoded> </item> <item><title>By: coop</title><link>http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-147860</link> <dc:creator>coop</dc:creator> <pubDate>Thu, 26 Mar 2009 13:46:58 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-147860</guid> <description>Hello
I wanna config a router with iptables for my WLAN. my problem, there is a database (mysql) there are all mac adresses, whitch have access...
is there a way to marry iptables with mysql??
best &amp; THX coop</description> <content:encoded><![CDATA[<p>Hello</p><p>I wanna config a router with iptables for my WLAN. my problem, there is a database (mysql) there are all mac adresses, whitch have access&#8230;</p><p>is there a way to marry iptables with mysql??</p><p>best &amp; THX coop</p> ]]></content:encoded> </item> <item><title>By: Luis</title><link>http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-144310</link> <dc:creator>Luis</dc:creator> <pubDate>Tue, 08 Jul 2008 16:07:57 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-144310</guid> <description>Could someone help.
I have to arm machines whit linux kernel 2.6
I wan&#039;t to make a remote acess but i can&#039;t...
one I have been defined a mac address ifconfig eth0 hw ether 0B:62:9D:6D:1A:34
I made ping suceful but when I try ftp ore telnet it refuse the conection...</description> <content:encoded><![CDATA[<p>Could someone help.<br
/> I have to arm machines whit linux kernel 2.6<br
/> I wan&#8217;t to make a remote acess but i can&#8217;t&#8230;<br
/> one I have been defined a mac address ifconfig eth0 hw ether 0B:62:9D:6D:1A:34<br
/> I made ping suceful but when I try ftp ore telnet it refuse the conection&#8230;</p> ]]></content:encoded> </item> <item><title>By: vivek</title><link>http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-143764</link> <dc:creator>vivek</dc:creator> <pubDate>Mon, 12 May 2008 20:33:26 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-143764</guid> <description>Sure, you can use -s IP-address option. Verify source IP 192.168.1.200 along with MAC 00:0F:EA:91:04:08 and if both matched drop it:
&lt;code&gt;iptables -A INPUT -p tcp -s 192.168.1.200 -m mac --mac-source 00:0F:EA:91:04:08 -j DROP&lt;/code&gt;</description> <content:encoded><![CDATA[<p>Sure, you can use -s IP-address option. Verify source IP 192.168.1.200 along with MAC 00:0F:EA:91:04:08 and if both matched drop it:<br
/> <code>iptables -A INPUT -p tcp -s 192.168.1.200 -m mac --mac-source 00:0F:EA:91:04:08 -j DROP</code></p> ]]></content:encoded> </item> <item><title>By: Shawn</title><link>http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-143763</link> <dc:creator>Shawn</dc:creator> <pubDate>Mon, 12 May 2008 20:26:01 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-143763</guid> <description>Is there a way to use this in conjunction with the source IP. So that you can enforce a MAC address to only be allowed through if it is using a specific IP address?
--
Thanks
Shawn</description> <content:encoded><![CDATA[<p>Is there a way to use this in conjunction with the source IP. So that you can enforce a MAC address to only be allowed through if it is using a specific IP address?</p><p>&#8211;<br
/> Thanks<br
/> Shawn</p> ]]></content:encoded> </item> <item><title>By: Orvalho J Augusto</title><link>http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-143700</link> <dc:creator>Orvalho J Augusto</dc:creator> <pubDate>Wed, 07 May 2008 02:32:16 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-143700</guid> <description>Great!
You are good ones
Caveman</description> <content:encoded><![CDATA[<p>Great!</p><p>You are good ones<br
/> Caveman</p> ]]></content:encoded> </item> <item><title>By: Lilian</title><link>http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-141984</link> <dc:creator>Lilian</dc:creator> <pubDate>Wed, 28 Nov 2007 05:57:13 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-141984</guid> <description>to ZEE
Allow an ip or network group to conect via SSH
/etc/host.allow
SSHD:192.168.0.4 or something like this 192.168.0.
Deny all conection on SSH
/etc/host.deny
SSHD:ALL
I think it will help you</description> <content:encoded><![CDATA[<p>to ZEE</p><p>Allow an ip or network group to conect via SSH<br
/> /etc/host.allow</p><p>SSHD:192.168.0.4 or something like this 192.168.0.</p><p>Deny all conection on SSH<br
/> /etc/host.deny</p><p>SSHD:ALL</p><p>I think it will help you</p> ]]></content:encoded> </item> <item><title>By: zee</title><link>http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-141901</link> <dc:creator>zee</dc:creator> <pubDate>Mon, 19 Nov 2007 14:50:32 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/iptables-mac-address-filtering.html#comment-141901</guid> <description>please i want to ban everyone of using my shell which is port 22 but keep their access on other ports and i owuld like only my PC to log to shell from my MAC address, anyone can help plz???</description> <content:encoded><![CDATA[<p>please i want to ban everyone of using my shell which is port 22 but keep their access on other ports and i owuld like only my PC to log to shell from my MAC address, anyone can help plz???</p> ]]></content:encoded> </item> </channel> </rss>
