[SOLVED] Files to change IP, mask, and default gateway, & on a vsftp server
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Files to change IP, mask, and default gateway, & on a vsftp server
I know in /etc/sysconfig/network-scripts/ for the ifcfg-eth0 you have to change the IP address, mask, and default gateway in that file for the actual interface itself.
Aren't there other files that may contain the mask and default gateway that I should check to see if they need to be updated as well?
Also, this is a vsftpd server, not sure if its config contains any network info that needs to be updated either?
Yes you right if you only have one network card.
If you have more than one card, you need to find out which card is connected.
You can find out with ethtool command if you don't have physical access to server.
For vsftp server, generally it will listen on all the interfaces.
Find out which interfaces with
netstat -anp | grep vsftp
Thanks, i'll check it out. But isn't there another file somewhere (not one of the interface files but a general file) that might have at least the default gateway in it? I keep thinking there is for some reason.
Although I am still confuse what you try to ask, for default gateway(route) at RedHat. You can configure two ways.
1. You can put GATEWAY=x.x.x.x at one of the /etc/sysconfig/network-scripts/if-cfgX
2. You can put GATEWAY=x.x.x.x at /etc/sysconfig/network
when I look in my ifcfg-eth0, I don't have a gateway=x.x.x.x, so does that mean it's using the gateway that's in /etc/sysconfig/network? or could it be called something else in ifcfg-eth0, like network=x.x.x.x?
I'm kinda confused, as those are both currently set to different IPs, so wasn't sure. Here's what's currently on my server, with the non-important numbers changed slightly. I've been given a new IP, mask, and default gateway so I can move my server, but I've never changed all that before so want to make sure I know all the spots I need to change.
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
22.214.171.124 0.0.0.0 255.255.255.192 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 126.96.36.199 0.0.0.0 UG 0 0 0 eth0
What I still don't understand exactly is, how do I figure out that with an IPADDR=188.8.131.52 and NETMASK=255.255.255.192, that that equals a NETWORK=184.108.40.206? Like if someone gave me an IP and netmask, how do you go about figuring out network?