LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 11-16-2005, 12:31 AM   #1
InJesus
Member
 
Registered: Oct 2005
Location: MN
Distribution: Slack, Slamd64
Posts: 33

Rep: Reputation: 15
Iptables/Mac address


Hey, I'm using iptables and currently they block everything and allow my computers from our office into our servers via IP addresses. to shh/ftp at home I have a cable hookup and my ip address is constantly changing. I would like to add a rule to allow my computer in, I've been looking into creating a rule that would allow me via Mac address.

********************
/sbin/iptables -A INPUT -p tcp --syn -m mac --mac-source XX:XX:XX:XX:XX:XX --destination-port 22 -j ACCEPT
********************
I've tried this using the mac address obtained from ipconfig /all and the one from arp -a.

neither one allow me into the server via ssh. I'm wondering if I'm not getting the proper mac address or if iptables dosen't work that way. has anyone encountered this and does anyone have a solution?

Thanks
J
 
Old 11-16-2005, 07:21 AM   #2
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,778
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Quote:
to shh/ftp at home I have a cable hookup and my ip address is constantly changing. I would like to add a rule to allow my computer in, I've been looking into creating a rule that would allow me via Mac address.
I don't think this is going to work. If I remember correctly, MAC addresses aren't preserved as the packets wander around the internet.
 
Old 11-16-2005, 11:36 PM   #3
sopiaz57
Member
 
Registered: Apr 2003
Distribution: RH 8
Posts: 246

Rep: Reputation: 30
DyDNS

Look into a dynamic dns name from a free provider like dyndns. I am not exactly sure of your situation but this will solve your problem of a changing ip addr.
 
Old 11-17-2005, 05:57 AM   #4
ddaas
Member
 
Registered: Oct 2004
Location: Romania
Distribution: Ubuntu server, FreeBsd
Posts: 453

Rep: Reputation: 30
You can't use your MAC address for filtering because MAC address is changed by every router between your cable modem/router and you server at work. You MAC address is available only between your computer and the first router. Every router between source and destination replace the source mac address with his own mac.
You could use dyndns or something like this and filter by IP (dns name).
 
  


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 rules with mac address? xpathfinder Linux - Security 3 12-11-2005 09:23 PM
blocking mac address using iptables Kendo1979 Linux - Networking 9 10-25-2004 04:09 AM
MAC address iptables questions scottman Linux - Security 2 10-01-2004 01:26 PM
MAC Address + IPTABLES yvesg Linux - Networking 1 05-10-2004 08:36 PM
logsnorter-0.2 iptables MAC address toovato Linux - Security 9 10-30-2003 06:47 AM


All times are GMT -5. The time now is 12:24 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration