jawj / IKEv2-setup

Set up Ubuntu Server 20.04 (or 18.04) as an IKEv2 VPN server
1.35k stars 338 forks source link

Setup fails on numeric hostnames #86

Closed diev closed 4 years ago

diev commented 5 years ago

My favorite VPS hoster gives a numeric hostname (5 digits of the order) with the public DNS name as "12345.ip-ns.net" (12345 is here as a changed example). And your setup script fails as it is shown below:

root@12345:~# ./setup.sh

=== https://github.com/jawj/IKEv2-setup ===

--- Updating and installing software ---

Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Hit:2 http://mirror.yandex.ru/ubuntu bionic InRelease
Hit:3 http://mirror.yandex.ru/ubuntu bionic-updates InRelease
Hit:4 http://mirror.yandex.ru/ubuntu bionic-backports InRelease
Fetched 88.7 kB in 0s (250 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
software-properties-common is already the newest version (0.96.24.32.7).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up postfix (3.3.0-1ubuntu0.2) ...
postconf: warning: valid_hostname: numeric hostname: 12345
postconf: fatal: unable to use my own hostname
Use of uninitialized value $destinations in scalar chomp at /var/lib/dpkg/info/postfix.config line 223.
Use of uninitialized value $_[1] in join or string at /usr/share/perl5/Debconf/Client/ConfModule.pm line 121.
postconf: warning: valid_hostname: numeric hostname: 12345
postconf: fatal: unable to use my own hostname
Use of uninitialized value $mynetworks in scalar chomp at /var/lib/dpkg/info/postfix.config line 287.
Use of uninitialized value $_[1] in join or string at /usr/share/perl5/Debconf/Client/ConfModule.pm line 121.
postconf: warning: valid_hostname: numeric hostname: 12345
postconf: fatal: unable to use my own hostname
Use of uninitialized value $protos in scalar chomp at /var/lib/dpkg/info/postfix.config line 389.
Use of uninitialized value $_[1] in join or string at /usr/share/perl5/Debconf/Client/ConfModule.pm line 121.
postconf: warning: valid_hostname: numeric hostname: 12345
postconf: fatal: unable to use my own hostname
postconf: warning: valid_hostname: numeric hostname: 12345
postconf: fatal: unable to use my own hostname
dpkg: error processing package postfix (--configure):
 installed postfix package post-installation script subprocess returned error exit status 1
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Errors were encountered while processing:
 postfix
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@12345:~#

Is it possible to remark the postfix actions at all if I know what your script will try to send me?

(An idea is just to add such example outputs nearby to your repo as documentation - please no unwanted emails for one's privacy.)

EnthusiastKE commented 5 years ago

You can try IP Addresses instead of Hostnames. Suggestion ...

On Sun, Mar 17, 2019 at 4:19 PM Dmitrii Evdokimov notifications@github.com wrote:

My favorite VPS hoster gives a numeric hostname (5 digits of the order) with the public DNS name as "12345.ip-ns.net" (12345 is here as a changed example). And your setup script fails as it is shown below:

root@12345:~# ./setup.sh

=== https://github.com/jawj/IKEv2-setup ===

--- Updating and installing software ---

Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB] Hit:2 http://mirror.yandex.ru/ubuntu bionic InRelease Hit:3 http://mirror.yandex.ru/ubuntu bionic-updates InRelease Hit:4 http://mirror.yandex.ru/ubuntu bionic-backports InRelease Fetched 88.7 kB in 0s (250 kB/s) Reading package lists... Done Reading package lists... Done Building dependency tree Reading state information... Done software-properties-common is already the newest version (0.96.24.32.7). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Setting up postfix (3.3.0-1ubuntu0.2) ... postconf: warning: validhostname: numeric hostname: 12345 postconf: fatal: unable to use my own hostname Use of uninitialized value $destinations in scalar chomp at /var/lib/dpkg/info/postfix.config line 223. Use of uninitialized value $[1] in join or string at /usr/share/perl5/Debconf/Client/ConfModule.pm line 121. postconf: warning: validhostname: numeric hostname: 12345 postconf: fatal: unable to use my own hostname Use of uninitialized value $mynetworks in scalar chomp at /var/lib/dpkg/info/postfix.config line 287. Use of uninitialized value $[1] in join or string at /usr/share/perl5/Debconf/Client/ConfModule.pm line 121. postconf: warning: validhostname: numeric hostname: 12345 postconf: fatal: unable to use my own hostname Use of uninitialized value $protos in scalar chomp at /var/lib/dpkg/info/postfix.config line 389. Use of uninitialized value $[1] in join or string at /usr/share/perl5/Debconf/Client/ConfModule.pm line 121. postconf: warning: valid_hostname: numeric hostname: 12345 postconf: fatal: unable to use my own hostname postconf: warning: valid_hostname: numeric hostname: 12345 postconf: fatal: unable to use my own hostname dpkg: error processing package postfix (--configure): installed postfix package post-installation script subprocess returned error exit status 1 Processing triggers for libc-bin (2.27-3ubuntu1) ... Errors were encountered while processing: postfix E: Sub-process /usr/bin/dpkg returned an error code (1) root@12345:~#

Is it possible to remark the postfix actions at all if I know what your script will try to send me?

(An idea is just to add such example outputs nearby to your repo as documentation - please no unwanted emails for one's privacy.)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jawj/IKEv2-setup/issues/86, or mute the thread https://github.com/notifications/unsubscribe-auth/AtTZFO-DP5AYswxAamtnHl-2mSKiJCDRks5vXkDDgaJpZM4b4YKR .

jawj commented 4 years ago

Can you change the hostname and re-run the script?