V-antena and Tanimoto's page

谷本の備忘録・雑記帳・work

>

カテゴリー: Raspberry pi

CATEGORY ARCHIVE

There were many ufw block logs in syslog, ufw.log and messages under /var/log/
,like as
Apr 15 16:29:05 raspberrypi kernel: [2831949.081700] [UFW BLOCK] IN=wlan0 OUT= MAC=xxxxxxxxxxxxxxxx SRC=IP address of router DST=224.0.0.1 LEN=28 TOS=0x00 PREC=0xC0 TTL=1 ID=28502 PROTO=2

Work around:
$ sudo ufw allow in from ‘IP address of router’ to 224.0.0.1
or
$ sudo ufw block in from ‘IP address of router’ to 224.0.0.1

Another garbage was like as
Apr 15 16:41:44 raspberrypi rsyslogd-2007: action ‘action 18’ suspended, next retry bla bla bla

Work around:
$ sudo nano /etc/rsyslog.conf

Comment out of rear part such as
#daemon.;mail.;\
#news.err;\
#.=debug;.=info;\
#.=notice;.=warn |/dev/xconsole

then reboot

wordpress 用のデータをバックアップするためにExpectを使ってバックアップのためのス
クリプトを作ったので掲載。 後はcronで自動実行。
To backup wordpress data easily, I created a script with Expect and post it to
this site.

‘ install method in debian, ubuntu, raspbian
$ sudo apt-get install expect

‘script
――――from here―――――――――――――――――-
#!/usr/bin/expect
set timeout 300
spawn sudo scp -r aaa@192.168.xxx.yyy:/abc /backups/xxx
expect “aaa@192.168.xxx.yyy’s password:”
send “password\n”
expect “aaa@hostname ~ $”
spawn sudo scp -r aaa@192.168.xxx.yyy:/defg /backups/xxx
expect “aaa@192.168.xxx.yyy’s password:”
send “password\n”
expect “aaa@hostname ~ $”
spawn sudo scp -r bbb@192.168.zzz.uuu:/abc /backups/zzz
expect “bbb@192.168.zzz.uuu’s password:”
send “password2\n”
expect “bbb@hostname2 ~ $”
exit 0
――――――― until here―――――――――?

aaa, bbb, xxx, yyy, abc, defg, abc, hostname, hostname2 are
dummy just for open for public.

As the following warning appeared after introducing of a domain name, I fixed it
by modifying of /etc/hosts.

Warning:

apache2: Could not reliably determine the server’s fully qualified domain name,
using 127.0.1.1 for ServerName

Fix:

sudo nano /etc/hosts

before
127.0.1.1 host_name

after
127.0.1.1 domain_name host_name

Then restart apache.

simle DNS

―――- server side ――
$ sudo apt-get update
$ sudo apt-get install dnsmasq

$ sudo nano /etc/hosts

192.168.2.199 windows7pro
192.168.2.197 debian
192.168.2.198 centos6
192.168.2.192 ubuntu

――― linux client side ――

add
dns-nameserver ‘IP of setted dnsmasq server’
なお、一番先頭にもってこないと、debian以外はうまくいかず

――――-added on 2016/3/13 ――――――
Don’t forget updating of /etc/resolv.conf
――――――――――――――――――――

――― windows client side ――

properties でDNSに追加

詳細設定のDNSのところで、さらに、
a single period (.) を追加が必要

―added on 2016/3/13――――――
at command prompt, the following command may be necessary ipconfig /flushdns

―added on 2016/3/19―――――――-
If and When the dnsmasq server is rebooted, “ipconfig/flushdns” may be necessary.
Though I don’t know why.

―-added on 2016/4/11―――――――
I don’t know the reason,but windows side couldn’t resolve right IP address. Restarting of Windows was necessary.

V-antena and Tanimoto's page

あなたはIPv4でアクセスしています