Toon posts:

hwaddress aanpassen in Ipcop 1.3

Pagina: 1
Acties:
  • 27 views sinds 30-01-2008

Verwijderd

Topicstarter
How do I change the MAC Address of my RED Interface
This is a frig for 1.2 only!!!.
Edit /var/ipcop/ethernet/settings. Add this line after the other lines starting RED.


RED_HWADDR=hh:hh:hh:hh:hh:hh
Replace the hh with the required hex MAC address.
Edit /etc/rc.d/rc.netaddress.up. Add the ifconfig $RED_DEV hw ether $RED_HWADDR lines


if [ "$CONFIG_TYPE" = "2" -o "$CONFIG_TYPE" = "3" ]; then
if [ "$RED_DEV" != "" ]; then
if [ "$RED_TYPE" = "DHCP" ]; then
rm /etc/dhcpc/*.info -f
ifconfig $RED_DEV hw ether $RED_HWADDR
/sbin/dhcpcd -h $RED_DHCP_HOSTNAME -R $RED_DEV
elif [ "$RED_TYPE" = "STATIC" -o "$RED_TYPE" = "PPTP" ]; then
ifconfig $RED_DEV hw ether $RED_HWADDR


hierboven geldt voor Ipcop 1.2, ik wil mijn ipcop RED-interface aanpassen naar een 3com kaartje en niet de Realtek die er nu inzit (stabiliteit). Ik heb chello, dus moet zelfde mac-adres gebruiken voor wan-interface (Authenticatie dmv mac-adres via LDAP), anders bellen naar helpdesk en stuff, ik wil niet afhankelijk zijn van mijn ISP.

Heeft iemand enig idee?

Verwijderd

Topicstarter
Hieronder staat een stukkie van etc/rc.d/rc.red, ik denk dat hier je het hwaddr aan moet passen, is ongeveer zo bij Smoothwall. In Smoothwall 2.0 is het onder /etc/rc.d/rc.netaddress.up en dan gooi je de volgende "regel" gelijk na deze 2 lijnen:

If [ "$CONFIG_TYPE" = "2" -o "$CONFIG_TYPE" = "3" ]; then
if [ "$RED_DEV" !=""]; then
"ifconfig #RED_DEV hw ether 11:22:33:44:55:66" <----jouw mac-adres!!!!!!

Ik weet alleen niet waar ik deze moet plaatsen in rc.red in Ipcop:


### Red device is ethernet
###
if ($netsettings{'CONFIG_TYPE'} =~ /^(2|3)$/)
{
if ($netsettings{'RED_DEV'} ne '')
{
&log("Starting RED device $netsettings{'RED_DEV'}.");

if ( $netsettings{'RED_TYPE'} eq 'DHCP')
{
unlink </etc/dhcpc/*.info>;
system ("/sbin/dhcpcd",
"-h",$netsettings{'RED_DHCP_HOSTNAME'},
"-R",$netsettings{'RED_DEV'});
}
elsif ( $netsettings{'RED_TYPE'} =~ /^(STATIC|PPTP)$/)

Verwijderd

Topicstarter
Ik mensen een beetje achterlijk, maar ik ben er zelf al achter gekomen hoe ik het aan moet passen en dat nog wel voor een Linux n00b!!

Ga naar/etc/rc.d.rc.netaddress.up

# RED is a network link
if [ "$CONFIG_TYPE" = "2" -o "$CONFIG_TYPE" = "3" ]; then
"ifconfig $RED_DEV hw ether 11:22:33:44:55:66" <--- Zet deze regel erbij met jou mac
/etc/rc.d/rc.red start

Ik ben hier echt een 2 dagen mij bezig geweest, soms is het gemakkelijker dan je denkt.

[ Voor 28% gewijzigd door Verwijderd op 11-10-2003 16:48 ]


  • blaataaps
  • Registratie: Juli 2001
  • Niet online
Opgelost dus, en volgens mij staat het antwoord gewoon in je startpost al? Dicht dus :)

Dit topic is gesloten.