Archive for the ‘linux’ Category

for DSM6 edit the file: /etc/samba/smb.conf,
for DSM5: /usr/syno/etc/smb.conf
add in [GENERAL] max xmit = 4096
to commit the changes, disable/enable samba from control panel/file services or reboot the nas.

also adjust the mss clamping on vpn traffic around the value 1300

On source: rsync -avopr -e ssh /vz/template/* root@[destination_ip]:/vz/template/
On destination: rsync -avopr -e ssh root@[source_ip]:/vz/template/* /vz/template/

adjust /etc/php.ini (default path)
then /usr/local/psa/bin/php_settings –update-all -> it modifies all websites php.ini according to server /etc/php.ini

# /usr/local/psa/bin/php_settings –help

Usage: php_settings command [options]
Available commands:
–update-all or -u Update per-domain PHP settings of all domains in accordance with the server-wide php.ini file.


create /var/www/vhosts/$DOMAIN$/conf/vhost.conf

content:

<DIRECTORY /var/www/vhosts/$DOMAIN$/httpdocs>

<IfModule sapi_apache2.c>

php_admin_flag engine on

# General settings

php_admin_flag safe_mode off

php_admin_value open_basedir "/var/www/vhosts/$DOMAIN$/:/tmp/"

# Performance settings (not mandatory)

php_admin_value memory_limit 512M

php_admin_value max_execution_time 600

php_admin_value max_input_time 300

php_admin_value post_max_size 60M

php_admin_value upload_max_filesize 60M

# Additional directives

</IfModule>

</DIRECTORY>

<DIRECTORY /var/www/vhosts/$DOMAIN$/httpdocs>

<IfModule mod_php5.c>

php_admin_flag engine on

# General settings

php_admin_flag safe_mode off

php_admin_value open_basedir "/var/www/vhosts/$DOMAIN$/:/tmp/"

# Performance settings

php_admin_value memory_limit 512M

php_admin_value max_execution_time 600

php_admin_value max_input_time 300

php_admin_value post_max_size 60M

php_admin_value upload_max_filesize 60M

# Additional directives

   AddHandler php5-script .hph

   AddType text/html .hph

</IfModule>

</DIRECTORY>

/usr/local/psa/admin/sbin/httpdmng --reconfigure-domain $DOMAIN$



and voila..

syno vpn client control panel

oke, after u setup the vpn and you get it working:
enable telnet/ssh on synology box
login into synology
type ifconfig
you should see an pppx interface:

ppp0 Link encap:Point-to-Point Protocol
inet addr:192.168.1.44 P-t-P:192.168.1.99 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1396 Metric:1
RX packets:1819 errors:0 dropped:0 overruns:0 frame:0
TX packets:1372 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:1694061 (1.6 MiB) TX bytes:236202 (230.6 KiB)

you need the P-t-P ip: in this case is 192.168.1.99

vi /etc/ppp/ip-up

add at the end of file:

#added for vpn routes
case "${IPREMOTE}" in
192.168.1.99)
ip ro add 1.2.3.4/24 dev ${IFNAME}
ip ro add 2.3.4.0/24 dev ${IFNAME}
;;
esac

restart vpn from control panel:
you should see already the new routes:

nas> ip route show
192.168.1.99 dev ppp0 src 192.168.1.44
|ip of vpn server| via |default gw| dev eth0 src |ip of syno|
|local subnet|/24 dev eth0
1.2.3.4/24 dev ppp0
2.3.4.0/24 dev ppp0
default via |gateway| dev eth0

before:
# head FormMail.pl
#!/usr/bin/perl
##############################################################################

after:
# head FormMail.pl
#!/usr/bin/perl -wT
##############################################################################

not exactly sure why, but perl w/o this 2 variables does not work called from execve

vzmlocal -C SOURCEID:DESTID

on source: vzmigrate –keep-dst -r no -v root@IP CTID
will ask for password

for online migration:
on destination: service vz init
on source: vzmigrate –keep-dst –online -r no -v root@IP CTID
will ask for password

http://kb.sp.parallels.com/en/113024

dmidecode -t 17

rpm2cpio package.rpm | cpio –id (extracts everything in curr dir)