Networking Forums

Networking Forums > Computer Networking > Linux Networking > how tho change source address of eth0/eth0:1 ?

Reply
Thread Tools Display Modes

how tho change source address of eth0/eth0:1 ?

 
 
news
Guest
Posts: n/a

 
      06-07-2004, 11:41 AM
Hi,

I have an ethernet card with two IP-address (eth0 & eth0:1). When I verify
which IP-address is used as source it turns out eth0:1 and NOT eth0. Is it
possible to change this so that the source address is that of eth0 again?

Thanks,
Rene


 
Reply With Quote
 
 
 
 
Cameron Kerr
Guest
Posts: n/a

 
      06-07-2004, 09:13 PM
news <(E-Mail Removed)> wrote:

> I have an ethernet card with two IP-address (eth0 & eth0:1). When I verify
> which IP-address is used as source it turns out eth0:1 and NOT eth0. Is it
> possible to change this so that the source address is that of eth0 again?


Why would you want to? This seems like a very broken thing to be doing.

This is not a trivial thing to do, although I suppose you could use SNAT
on packets going out eth0:1 and SNAT them to the source address of eth0

eth0_ip=1.2.3.4
eth0_1_ip=2.3.4.5

iptables -t nat -A POSTROUTING -o eth0:1 -j SNAT --to-source $eth0_ip

I don't know if this will work, but it's worth a shot. You may also need
to set up connection tracking.

--
Cameron Kerr
(E-Mail Removed) : http://nzgeeks.org/cameron/
Empowered by Perl!
 
Reply With Quote
 
Max
Guest
Posts: n/a

 
      06-09-2004, 03:25 PM
"news" <(E-Mail Removed)> wrote in message news:<40c4547f$0$30374$(E-Mail Removed)4 all.nl>...
> Hi,
>
> I have an ethernet card with two IP-address (eth0 & eth0:1). When I verify
> which IP-address is used as source it turns out eth0:1 and NOT eth0. Is it
> possible to change this so that the source address is that of eth0 again?
>
> Thanks,
> Rene

I think that it depends on the interface the app. choose to send sout
packets. It may help to check you routing table.
Max
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't get eth0 up (wired) - e1000 device eth0 does not seem to be present, delaying initialization. OtisUsenet Linux Networking 2 06-06-2007 02:57 AM
martian source 255.255.255.255 from 10.64.39.106, on dev eth0 baholeoko Linux Networking 13 03-21-2006 06:19 AM
firewall kernel: martian source 196.xx.xx.xx from 165,146.xx.xx on dev eth0 ??? Vampyre Linux Networking 3 01-24-2006 01:41 PM
martian source: 127.0.0.1 on eth0? Frank Wolk Linux Networking 9 01-22-2004 10:14 AM
Martian source from localhost on eth0 Jan Bols Linux Networking 1 07-18-2003 11:42 AM



1 2 3 4 5 6 7 8 9 10 11