My Tech Note's

Mês: Abril 2014

Howto make tunnel with iproute

Machine A has ip address 192.168.56.101
Machine B has ip address 192.168.56.102

You can call your tunnel whatever you like and i will  call for example tl0.

Machine A

ip tunnel add tl0 mode ipip remote 192.168.56.102 local 192.168.56.101
ip link set tl0 up
ip addr add 10.10.10.1/24 dev tl0

Machine B

ip tunnel add tl0 mode ipip remote 192.168.56.101 local 192.168.56.102
ip link set tl0 up
ip addr add 10.10.10.2/24 dev tl0

On machine A

[email protected]:~# ping 10.10.10.2
PING 10.10.10.2 (10.10.10.2) 56(84) bytes of data.
64 bytes from 10.10.10.2: icmp_req=1 ttl=62 time=0.403 ms
64 bytes from 10.10.10.2: icmp_req=2 ttl=62 time=0.397 ms
^C
— 10.10.10.2 ping statistics —
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.397/0.400/0.403/0.003 ms

[email protected]:~# ping 10.10.10.1
PING 10.10.10.1 (10.10.10.1) 56(84) bytes of data.
64 bytes from 10.10.10.1: icmp_req=1 ttl=62 time=0.403 ms
64 bytes from 10.10.10.1: icmp_req=2 ttl=62 time=0.397 ms
^C
— 10.10.10.1 ping statistics —
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.397/0.400/0.403/0.003 ms

and its works, but insecure 🙁

Howto convert rrd files between architectures

While migrating cacti over to a new virtual machine I’ve got “ERROR: This RRD was created on another architecture” when generate new graph
you need convert  all rrd files from  32bit to 64bit.
On the 32 bit machine in <directory_cacti>/rra/ and run then:

for i in `find ./ -type f -name “*.rrd” -print`; \
do \
rrdtool dump $i > $i.xml; \
done

Copy all xml files to the other 64b machine, and put on same location and run then on 64b machine:

for i in `ls *.xml`; \
do \
rrdtool restore $i `echo $i |sed s/.xml//g`; \
done

PHP: Unable to load dynamic library suhosin.so on Debian 7

After upgrading to Debian 7 (from Debian 6), the PHP produce error like
" PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/suhosin.so' - /usr/lib/php5/20100525/suhosin.so: cannot open shared object file" 
Reason why it happen:
  php5-suhosin depends on an obsolete version of phpapi-20090626+lfs
  so php5-suhosin is removed during the upgrade... but the PHP config
  snippet /etc/php5/conf.d/suhosin.ini isn't purged... so PHP still
  try to load the module suhosin.so.

The release notes should document that the user should:
  dpkg -P php5-suhosin


more info

© 2020 Sec&Stuff&Others

Theme by Anders NorenUp ↑