Re: Problems remotely changing IP address of second NIC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Seth Art wrote:
I am wondering if anyone knows what i am doing wrong.   This has been
bothering me for months.  I have a Fedora Core 2 machine in another
city that i monitor remotely.  It has 2 NICS.  One of them is
connected to a LAN and has an IP address always.  I use this to ssh
into the box on a daily basis.  The other card is in promiscuous mode
with no IP address and sniffs traffic from a DMZ.  (if you haven't
guessed yet its a snort box).     Every once and a while there comes a
need for me to give the card on the DMZ an IP address temporarily.

This is what i do:

1) I SSH into to the LAN CARD, become root. 2) I then use system-config-network-gui though the ssh connection to
get a nice gui from the remote machine.
3) There is no DHCP server on the DMZ so i give it a static address on
the same subnet, set subnet mask to 255.255.255.0 and default gateway
to the correct default gateway.
4) I then apply changes and activate the card.


Is there something i am doing wrong?   Is there a better more
effective way accomplish what i am doing?

Thanks for all your help,
Seth

You could try the following:

ifconfig ethx x.x.x.x netmask x.x.x.x gw x.x.x.x

This will temporarily assign the card (either eth0 or eth1 I don't know which for you) the ip address it needs as well as the netmask and proper gateway. If you do the following the card will go back to it's original configuration:

ifconfig eth0 down
ifconfig eth0 up

This is assuming that the card is eth0 it may be eth1 for you. You can also accomplish the same by editing /etc/sysconfig/network-scripts/ifcfg-ethx to edit the card's info and then reload it's config as such

ifconfig ethx down
ifconfig ethx up

And there you have it. This should function for you.

HTH

Alex White


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux