Skip to contentSkip to conversation

ip routing after changing mac address to a virtual one

DISCUSSION first last 2 participants 2 messages Nov 30, 2006 – Dec 3, 2006

lore
Share & tools
lore

first last

author
#0 lore raw

Hi Mike,

Yes, eth1 gets its IP address from DHCP server. DHCP server always gives me the same IP address because it knows my MAC address. So I only can get a different IP address by changing my MAC address.

B.R

Sina

Quoted 3 lines

trying to understand your question better -- does

eth1 use dhcp to get

Quoted 6 lines

a connection from the ISP?

Quoted 3 lines · first last

Hi all.

I have a SuSE Linux box with two network

interfaces.

Quoted 1 line
Quoted 1 line

An ethernet which I use to connect to the ISP, and

a

Quoted 2 lines
Quoted 2 lines

wireless interface to share Internet with my room mate. The problem is when I change the MAC address

of

Quoted 1 line
Quoted 1 line

my ethernet card (eth1) in order to get a different

IP

Quoted 4 lines
Quoted 4 lines

address from ISP, iptables no longer does the masquerading, thus my friend can't access to the Internet anymore. I try to restart iptables but nothing happens. Our guess is that iptables uses

real

Quoted 1 line
Quoted 1 line

mac addresses of network interfaces to forward and

NAT

Quoted 6 lines
Quoted 6 lines

ip packets, so it doesn't work with virtual MAC address.

can anyone please suggest a solution to this issue?

Thank you very much

____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com

#1 lore raw
Quoted 8 lines · first last

Hi Mike,

Yes, eth1 gets its IP address from DHCP server. DHCP server always gives me the same IP address because it knows my MAC address. So I only can get a different IP address by changing my MAC address.

[ Please don't toppost ]

Try to shutdown the interface, change the MAC, then bring the interface back up. Masquerading is a bit strange and I'm not completely sure what will work when. However, this way, it should definately work.

HTH,
M4