LinuxQuestions.org
Help answer threads with 0 replies.
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 09-26-2008, 04:46 AM   #1
bigsmile
LQ Newbie
 
Registered: Nov 2006
Posts: 4

Rep: Reputation: 0
iptables filtering by MAC address


Hi,
i'm trying to give access to our server at work port 443 using mac addresses.
I found my pc mac address using getmac command in cmd (vista) -


Code:
C:\Users>getmac
Physical Address    Transport Name
=================== ==========================================================
xx-xx-xx-xx-xx-xx   \Device\Tcpip_{yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy}
then i added it to the firewall using this command -
Code:
iptables -I INPUT 1 -p tcp --destination-port 443 -m mac --mac-source xx:xx:xx:xx:xx:xx -j ACCEPT
But, for some reason this does not work (the firewall blocking me).
Can someone tell me what else i need to check to make this work?
Thank you!

Last edited by bigsmile; 09-26-2008 at 04:48 AM.
 
Old 09-27-2008, 05:32 AM   #2
racracracrac
Member
 
Registered: Sep 2008
Posts: 44

Rep: Reputation: 15
I've never seen anyone use the mac address as the match. The man page suggests XX:XX:XX:XX:XX:XX rather than xx:xx:xx:xx:xx:xx. I guess you could try capitals.

I would run "tcpdump host <ipaddress>" to see what is really happening.

Last edited by david_ross; 10-09-2008 at 12:09 PM. Reason: removed spam
 
Old 09-27-2008, 06:51 PM   #3
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
MAC addresses only work inside your LAN, so if you are trying to access the server at work from your home PC, the MAC address the server will see is the one for the last hop in your LAN (usually the MAC of your gateway's LAN interface) - not your home PC's MAC.

Last edited by win32sux; 09-27-2008 at 07:15 PM.
 
  


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
iptables + mac address filtering Roko Linux - Networking 1 09-10-2008 07:38 AM
can mac address filtering be done from the internet? yongitz Linux - Networking 9 04-19-2007 01:45 AM
MAC address filtering in Slackware? houler Linux - Networking 9 05-12-2006 07:34 AM
mac address filtering gabsik Linux - Security 8 04-27-2006 08:23 AM
MAC address filtering firewall? gigaah Linux - Security 5 06-07-2004 11:05 AM

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

All times are GMT -5. The time now is 10:49 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration