LinuxQuestions.org
Visit Jeremy's Blog.
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 12-10-2005, 12:39 AM   #1
abakali
Member
 
Registered: Dec 2005
Location: karachi
Distribution: RedHat
Posts: 75

Rep: Reputation: 15
MASQUERADE with MAC


Hello - can i MASQUERADE all ports with defined mac i done it by ip tell me how to do this from mac

/sbin/iptables -t nat -A POSTROUTING -s 10.0.3.120 -o $EXTDEV -j MASQUERADE

this is true statement to MASQUERADE with MAC ?
/sbin/iptables -t nat -A POSTROUTING -m mac --mac-source 00:00:00:00:00:00 -o $EXTDEV -j MASQUERADE
 
Old 12-10-2005, 05:09 PM   #2
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
MAC won't work after routing. Packets will gain the MAC of the local machine when they get onto the eth cable. MAC is carried by the ethernet frame, and this is carrying the ip packet inside it.

You will need to MARK the packets in the mangle PREROUTING table and then MASQUERADE based on the MARK you have set.

I can't think of any useful reason to do this, so I gotta ask what you are trying to achieve..
 
  


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
Masquerade nanoprobe Linux - Networking 7 06-12-2005 08:48 AM
IP Masquerade qbik Slackware 3 09-11-2003 03:02 PM
IP Masquerade help armcfall Linux - Networking 6 06-24-2003 09:06 AM
IP Masquerade problems andrew001 Linux - Networking 2 02-04-2003 06:51 PM
About masquerade Nuts Linux - Networking 8 08-30-2002 09:56 AM

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

All times are GMT -5. The time now is 11:29 PM.

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