LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 05-10-2004, 04:45 PM   #1
yvesg
Member
 
Registered: May 2004
Distribution: SuSe v9.3 Professional
Posts: 33

Rep: Reputation: 15
MAC Address + IPTABLES


How-To allow traffic by using a MAC address and IPTABLES ?

I've found that I need to use -m MAC --mac-source xx:xx:xx:xx:xx:xx

But this doesn't seem to work for me.

I want to forward incoming traffic from the internet (at port 3389) to an internal pc on my network (at port 3389 also) but only my Laptop's MAC address is allowed to connect to that port.

I've used this command:

${IPTABLES} -t nat -A PREROUTING -i eth0 -p tcp --dport 3389 -j DNAT --to-destination 10.0.0.2:3389 -m mac --mac-source xx:xx:xx:xx:xx
${IPTABLES} -A FORWARD -p tcp -i eth0 -d 10.0.0.2 --dport 3389 -j ACCEPT

Without the -m mac specified, it works.

(This way even I can't connect to the port, security is to thight )

 
Old 05-10-2004, 08:36 PM   #2
RHELL
Member
 
Registered: Feb 2004
Location: Outermost mingetty
Distribution: RHEL3,RH4U4,Sol9, Sol10
Posts: 321

Rep: Reputation: 31
You will not see the MAC address of a host connected across the internet, only those on the same LAN as you.
 
  


Reply



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
Iptables/Mac address InJesus Linux - Security 3 11-17-2005 05:57 AM
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
logsnorter-0.2 iptables MAC address toovato Linux - Security 9 10-30-2003 06:47 AM

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

All times are GMT -5. The time now is 03:21 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
Open Source Consulting | Domain Registration