Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

My static IP was on Verizon's network, who are subletting their Fios lines to Frontier. Now I am given a new static IP from Frontier's data network. May I have a ballpark list of configurations to change to the new IP? It is like me to miss one thing and cause a problem. I have a LAMP with proftpd & ssh tunneling.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Checklist:

  • Firewall: if you've put a firewall rule in which denies all traffic which where not designated for your IP, you need to change that.
  • Interfaces file: Change the static IP in /etc/network/interfaces. This file is re-read when the network connection is set up again.
  • ProFTPd: the address on which ProFTPd is listening on
  • Apache: the address on which Apache is listening on. Also check your virtual host settings like <VirtualHost 1.2.3.4> and NameVirtualHost 1.2.3.4.
  • MySQL: check the address it's listening on. Usually, this is set to listen on all addresses.
  • DNS: all records which point to your IP.
  • To make sure you did not forget anything, search all files on your server for the old IP address using:

    sudo grep -HrnF '1.2.3.4' /
    

    This command shows every occurence of the IP address 1.2.3.4 as filename:line: line with 1.2.3.4.

share|improve this answer
    
Thank you, this is what I was looking for. I ran the grep command but ran into this: sudo@server:~$ sudo grep -HrnF '1.2.3.4' / grep: /usr/share/doc/bash/completion-contrib: No such file or directory grep: /usr/share/doc/libsane/supported.html: No such file or directory grep: /usr/share/man/man5/modprobe.d.5: No such file or directory grep: warning: /usr/bin/X11: recursive directory loop grep: /usr/src/linux-headers-2.6.32-28-server/source: No such file or directory And the process did not return me to command prompt. Is it safe to assume that my files were searched through? –  aesthetic priest Apr 15 '11 at 21:49
    
@aesthetic priest: When the process has completed, the program will return to shell. If you want to quit the search, press Ctrl + C. Note that this script searches for a literal occurence of 1.2.3.4. Other forms like 1. 23.234. 5, 1.2.3.0/24 or array(1,2,3,4) are not included. Use it as a tool to find references you've forgotten about. –  Lekensteyn Apr 16 '11 at 8:14
    
Maybe we should add I and --devices=skip to the grep command otherwise it will hang (don't know the exact reason, but it seems read somewhere in /proc). Next, redirect output to a file > oldips.txt, otherwise output may be lost (e.g. if it finds an old mailbox file with lots of old IP addresses). –  Thomas W. Mar 24 at 22:44
    
It's probably a better idea not to start searching in /, but look in /usr /etc /home /srv /var /boot /opt (and any additional custom dirs such as /media /mnt /www /your-own-dir). Descending in /proc /sys /dev is not sensible indeed. –  Lekensteyn Mar 24 at 23:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.