rm -r /path/to/directory/*
или
rm -rv /path/to/directory/*
если Вы хотите видеть то, что происходит.
Это уже поздно, но если вы не решили это, вот как:
В вашем примере просто замените:
Public IP-адрес:
туннелирование с gre:
На A:
# adding the interface for the tunnel
$ ip tunnel add tun2 mode gre remote 70.2.2.3 ttl 64
# setting the private ip address
$ ifconfig tun2 10.0.201.1/24
$ ifconfig tun2 up
# A point to point
$ ifconfig tun2 pointopoint 10.0.201.2
# enabling multicast (it's not necessary for this)
$ ifconfig tun2 multicast
$ ifconfig tun2 arp
$ ifconfig tun2 broadcast
# default route for the tunnel
$ ip route add 10.0.201.2 dev tun2
# enable ip forward
$ echo 1 > /proc/sys/net/ipv4/ip_forward
# add the permanent entries to the arp table in order to get the complete loop. (without this doesn't work)
# replace the public ips for your ips, and the mac for your real mac for your interface
# the word pub it's the most important here, if it's not there the arps will never go outside
$ arp -s 50.2.2.20 00:00:00:00:00:00 -i eth0 pub
$ arp -s 50.2.2.21 00:00:00:00:00:00 -i eth0 pub
$ arp -s 50.2.2.22 00:00:00:00:00:00 -i eth0 pub
На B:
# adding the interface for the tunnel
$ ip tunnel add tun2 mode gre remote 50.2.2.2 ttl 64
# setting the private ip address
$ ifconfig tun2 10.0.201.2/24
$ ifconfig tun2 up
# point to point B
$ ifconfig tun2 pointopoint 10.0.201.1
# enabling multicast (it's not necessary for this)
$ ifconfig tun2 multicast
$ ifconfig tun2 arp
$ ifconfig tun2 broadcast
# default route for the tunnel
$ ip route add 10.0.201.1 dev tun2
$ echo 1 > /proc/sys/net/ipv4/ip_forward
# putting the ips to listen in the eth0 as secondary ips
$ ip ad add 50.2.2.20/32 dev eth0
$ ip ad add 50.2.2.21/32 dev eth0
$ ip ad add 50.2.2.22/32 dev eth0
И все, у вас должен быть полностью функциональный туннель и возможность IP-адреса маршрутов, которые находятся далеко от того места, где вы хотите их использовать, так что теперь вы можете начать привязку некоторых демонов к этим IP-адресам.
Еще нужно иметь в виду, что если у вас так много IP-адресов, вы '