diff -urN smeserver-geneweb-2.3.0.old/root/etc/e-smith/db/accounts/defaults/geneweb/type smeserver-geneweb-2.3.0/root/etc/e-smith/db/accounts/defaults/geneweb/type --- smeserver-geneweb-2.3.0.old/root/etc/e-smith/db/accounts/defaults/geneweb/type 1970-01-01 04:00:00.000000000 +0400 +++ smeserver-geneweb-2.3.0/root/etc/e-smith/db/accounts/defaults/geneweb/type 2021-03-20 16:06:34.138000000 +0400 @@ -0,0 +1 @@ +reserved diff -urN smeserver-geneweb-2.3.0.old/root/etc/e-smith/db/accounts/defaults/gwsetup/type smeserver-geneweb-2.3.0/root/etc/e-smith/db/accounts/defaults/gwsetup/type --- smeserver-geneweb-2.3.0.old/root/etc/e-smith/db/accounts/defaults/gwsetup/type 1970-01-01 04:00:00.000000000 +0400 +++ smeserver-geneweb-2.3.0/root/etc/e-smith/db/accounts/defaults/gwsetup/type 2021-03-20 16:06:43.313000000 +0400 @@ -0,0 +1 @@ +reserved diff -urN smeserver-geneweb-2.3.0.old/root/etc/e-smith/db/configuration/defaults/geneweb/TcpPort smeserver-geneweb-2.3.0/root/etc/e-smith/db/configuration/defaults/geneweb/TcpPort --- smeserver-geneweb-2.3.0.old/root/etc/e-smith/db/configuration/defaults/geneweb/TcpPort 1970-01-01 04:00:00.000000000 +0400 +++ smeserver-geneweb-2.3.0/root/etc/e-smith/db/configuration/defaults/geneweb/TcpPort 2020-11-05 20:15:06.000000000 +0400 @@ -0,0 +1 @@ +2317 diff -urN smeserver-geneweb-2.3.0.old/root/etc/e-smith/db/configuration/defaults/geneweb/TCPPort smeserver-geneweb-2.3.0/root/etc/e-smith/db/configuration/defaults/geneweb/TCPPort --- smeserver-geneweb-2.3.0.old/root/etc/e-smith/db/configuration/defaults/geneweb/TCPPort 2020-11-05 20:15:06.000000000 +0400 +++ smeserver-geneweb-2.3.0/root/etc/e-smith/db/configuration/defaults/geneweb/TCPPort 1970-01-01 04:00:00.000000000 +0400 @@ -1 +0,0 @@ -2317 diff -urN smeserver-geneweb-2.3.0.old/root/etc/e-smith/db/configuration/defaults/gwsetup/TcpPort smeserver-geneweb-2.3.0/root/etc/e-smith/db/configuration/defaults/gwsetup/TcpPort --- smeserver-geneweb-2.3.0.old/root/etc/e-smith/db/configuration/defaults/gwsetup/TcpPort 1970-01-01 04:00:00.000000000 +0400 +++ smeserver-geneweb-2.3.0/root/etc/e-smith/db/configuration/defaults/gwsetup/TcpPort 2020-11-05 20:15:06.000000000 +0400 @@ -0,0 +1 @@ +2316 diff -urN smeserver-geneweb-2.3.0.old/root/etc/e-smith/db/configuration/defaults/gwsetup/TCPPort smeserver-geneweb-2.3.0/root/etc/e-smith/db/configuration/defaults/gwsetup/TCPPort --- smeserver-geneweb-2.3.0.old/root/etc/e-smith/db/configuration/defaults/gwsetup/TCPPort 2020-11-05 20:15:06.000000000 +0400 +++ smeserver-geneweb-2.3.0/root/etc/e-smith/db/configuration/defaults/gwsetup/TCPPort 1970-01-01 04:00:00.000000000 +0400 @@ -1 +0,0 @@ -2316 diff -urN smeserver-geneweb-2.3.0.old/root/etc/e-smith/db/configuration/migrate/20geneweb smeserver-geneweb-2.3.0/root/etc/e-smith/db/configuration/migrate/20geneweb --- smeserver-geneweb-2.3.0.old/root/etc/e-smith/db/configuration/migrate/20geneweb 2020-11-05 20:15:06.000000000 +0400 +++ smeserver-geneweb-2.3.0/root/etc/e-smith/db/configuration/migrate/20geneweb 2021-03-20 18:56:08.486000000 +0400 @@ -15,6 +15,11 @@ $rec->set_prop('domain', $service . '.' . ($DB->get('DomainName')->value() || '')); } + # change TCPPort attributes to TcpPort + if ( $rec->prop('TCPPort') ) { + $rec->set_prop('TcpPort', ($DB->get('TCPPort')->value() || '')); + $DB->delete_prop($service,'TCPPort'); + } } } diff -urN smeserver-geneweb-2.3.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/28gwd_gwsProxyPass smeserver-geneweb-2.3.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/28gwd_gwsProxyPass --- smeserver-geneweb-2.3.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/28gwd_gwsProxyPass 2021-03-13 21:28:10.000000000 +0400 +++ smeserver-geneweb-2.3.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/28gwd_gwsProxyPass 2021-03-20 15:50:27.293000000 +0400 @@ -1,6 +1,7 @@ { # vim: ft=perl: # proxypass for geneweb and gwsetup +# difference TCPPort & TcpPort (masq!) $haveSSL = (exists ${modSSL}{status} and ${modSSL}{status} eq "enabled") ? 'yes' : 'no'; $plainPort = ${'httpd-e-smith'}{TCPPort} || '80'; @@ -17,8 +18,8 @@ $OUT .= " ProxyRequests Off\n"; $OUT .= " ProxyPreserveHost On\n"; - $OUT .= " ProxyPass /$place http://127.0.0.1:${$place}{TCPPort} KeepAlive=On\n"; - $OUT .= " ProxyPassReverse /$place http://127.0.0.1:${$place}{TCPPort}\n"; + $OUT .= " ProxyPass /$place http://127.0.0.1:${$place}{TcpPort} KeepAlive=On\n"; + $OUT .= " ProxyPassReverse /$place http://127.0.0.1:${$place}{TcpPort}\n"; $OUT .= " RequestHeader set X-Forwarded-Proto 'http'\n"; $OUT .= " \n"; diff -urN smeserver-geneweb-2.3.0.old/root/etc/e-smith/templates/etc/rc.d/init.d/masq/91Geneweb smeserver-geneweb-2.3.0/root/etc/e-smith/templates/etc/rc.d/init.d/masq/91Geneweb --- smeserver-geneweb-2.3.0.old/root/etc/e-smith/templates/etc/rc.d/init.d/masq/91Geneweb 1970-01-01 04:00:00.000000000 +0400 +++ smeserver-geneweb-2.3.0/root/etc/e-smith/templates/etc/rc.d/init.d/masq/91Geneweb 2021-03-21 23:05:41.916000000 +0400 @@ -0,0 +1,22 @@ +{ + # geneweb port access only from localhost + my $gwd_status = ${'geneweb'}{'status'} || "disabled"; + my $gwd_port = ${'geneweb'}{'TcpPort'} || ''; + if ($gwd_status eq 'enabled') { + $OUT .= " # Geneweb enabled\n"; + $OUT .= " /sbin/iptables -I INPUT -p tcp ! -s 127.0.0.1 --dport $gwd_port --jump DROP \n"; + } else { + $OUT .= " # Geneweb disabled\n"; + } + + # gwsetup port access only from localhost + my $gws_status = ${'gwsetup'}{'status'} || "disabled"; + my $gws_port = ${'gwsetup'}{'TcpPort'} || ''; + if ($gws_status eq 'enabled') { + $OUT .= " # gwsetup enabled\n"; + $OUT .= " /sbin/iptables -I INPUT -p tcp ! -s 127.0.0.1 --dport $gws_port --jump DROP \n"; + } else { + $OUT .= " # gwsetup disabled\n"; + } +} + diff -urN smeserver-geneweb-2.3.0.old/root/usr/lib/systemd/systemd-gwsetup smeserver-geneweb-2.3.0/root/usr/lib/systemd/systemd-gwsetup --- smeserver-geneweb-2.3.0.old/root/usr/lib/systemd/systemd-gwsetup 2021-03-14 22:35:28.000000000 +0400 +++ smeserver-geneweb-2.3.0/root/usr/lib/systemd/systemd-gwsetup 2021-03-20 15:48:55.051000000 +0400 @@ -6,7 +6,7 @@ GWLANG=$(/sbin/e-smith/db configuration getprop sysconfig Language | sed -e 's/_.*$//') BD=$(/sbin/e-smith/db configuration getprop geneweb DBDir || echo "/opt/geneweb/bases") -TcpPort=$(/sbin/e-smith/db configuration getprop gwsetup TCPPort) +TcpPort=$(/sbin/e-smith/db configuration getprop gwsetup TcpPort) HD="/opt/geneweb/gw/gw" BIN=$HD/gwsetup