Issue after hostname change

Discussion in 'Technical' started by arspoetica, Feb 3, 2012.

  1. arspoetica

    arspoetica New Member

    So I already know that I should just leave it alone, but I wanted to change the prefix to my server

    blah.server.com > ns1.server.com

    Well I changed it in /etc/hosts and /etc/hostname, and after changing it and restarting everything seems to be working fine... except when I check with "netstat -alnp |grep -w LISTEN" it shows all 0.0.0.0's where my external static IP used to be (next to the open port). When I added a new listening port my IP pops back up on the new one, but still not on the old ones, which makes me think I missed a hostname somewhere or something to that effect.

    I followed the Perfect Server with ISPconfig 3 and courier guide so I have Bind9 and ISPconfig 3 and so on... oh, and there were a few errors with IPtables so I flushed that with iptables -F (this was after the problem occurred)

    Any ideas on what the issue is? I have tried searching for an answer, for an hour or two, but I don't really know what I am looking for or how to say it...
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Did you change the hostname also in your service configuratios (like Postfix, Apache, etc.)?
     
  3. arspoetica

    arspoetica New Member

    I changed it in ispconfig (although I read that that is more for the internal processes or something) but I couldn't find it in apache or postfix or any files for bind besides the zone file used by ispconfig... and any others than that and I don't know where to check. All that I have read all they ever say is to change it in the hostname and hosts files.

    I'm sure it is probably something stupid I am overlooking whether it be a mysql file, apache file or something that is staring me in the face

    I guess it could also be that I go to a file that is missing the server entry and I'm not familiar enough with the file to know that it should be there.
     
    Last edited: Feb 3, 2012
  4. falko

    falko Super Moderator ISPConfig Developer

    Let's start with Postfix. What's in /etc/postfix/main.cf and /etc/mailname?
     
  5. arspoetica

    arspoetica New Member

    in mailname it's just my domain without the prefix

    /etc/postfix/main.cf seems to link to a lot of mysql stuff but here it is

     
  6. falko

    falko Super Moderator ISPConfig Developer

    Can you run
    Code:
    postconf -e 'myorigin = server1.example.com'
    postconf -e 'myhostname = server1.example.com'
    ? Replace server1.example.com with your new hostname and restart Postfix.
     
  7. arspoetica

    arspoetica New Member

    Nope, nothing changed, but here is the results from netstat (minus the ports obviously, and pid to make it fit)
    But as you can see named is listed correctly from me re-enabling dns listening to any for bind.

    tcp........0____0_0.0.0.0________0.0.0.0:*____LISTEN____mysqld
    tcp........0____0_192.168.5.1____0.0.0.0:*____LISTEN____smbd
    tcp........0____0_127.0.0.1______0.0.0.0:*____LISTEN____smbd
    tcp........0____0_0.0.0.0________0.0.0.0:*____LISTEN____apache2
    tcp........0____0_0.0.0.0________0.0.0.0:*____LISTEN____rpc.mountd
    tcp........0____0_0.0.0.0________0.0.0.0:*____LISTEN____couriertcpd
    tcp........0____0_0.0.0.0________0.0.0.0:*____LISTEN____couriertcpd
    tcp........0____0_0.0.0.0________0.0.0.0:*____LISTEN____portmap
    tcp........0____0_0.0.0.0________0.0.0.0:*____LISTEN____apache2
    tcp........0____0_0.0.0.0________0.0.0.0:*____LISTEN____apache2
    tcp........0____0_0.0.0.0________0.0.0.0:*____LISTEN____rpc.statd
    tcp........0____0_63.225.43.65___0.0.0.0:*____LISTEN____named
    tcp........0____0_127.0.0.1______0.0.0.0:*____LISTEN____dnsmasq
    tcp........0____0_192.168.5.1____0.0.0.0:*____LISTEN____dnsmasq
    tcp........0____0_0.0.0.0________0.0.0.0:*____LISTEN____pure-ftpd (SER
    tcp........0____0_0.0.0.0________0.0.0.0:*____LISTEN____apache2
    tcp........0____0_0.0.0.0________0.0.0.0:*____LISTEN____master
    tcp........0____0_127.0.0.1______0.0.0.0:*____LISTEN____named
    tcp........0____0_0.0.0.0________0.0.0.0:*____LISTEN____apache2
    tcp........0____0_0.0.0.0________0.0.0.0:*____LISTEN____-
    tcp........0____0_192.168.5.1____0.0.0.0:*____LISTEN____smbd
    tcp........0____0_127.0.0.1______0.0.0.0:*____LISTEN____smbd
    tcp........0____0_0.0.0.0________0.0.0.0:*____LISTEN____sshd
    tcp........0____0_0.0.0.0________0.0.0.0:*____LISTEN____perl
    tcp........0____0_0.0.0.0________0.0.0.0:*____LISTEN____couriertcpd
    tcp........0____0_0.0.0.0________0.0.0.0:*____LISTEN____-
    tcp........0____0_0.0.0.0________0.0.0.0:*____LISTEN____couriertcpd
    tcp........0____0_0.0.0.0________0.0.0.0:*____LISTEN____xinetd
    tcp........0____0_127.0.0.1______0.0.0.0:*____LISTEN____amavisd
    tcp........0____0_127.0.0.1______0.0.0.0:*____LISTEN____master
     
    Last edited: Feb 5, 2012

Share This Page