Previamente, los routers de ambos proxys deben tener los puertos 22 y 500 redireccionados a dichos proxys y debe estar compilado e instalado (make && make install) el paquete "openvpn" en ambos proxys. Proxy Red 1:
# sysctl -w net.inet.ip.forwarding=1 # echo "net.inet.ip.forwarding=1" >> /etc/sysctl.conf # cd /usr/pkg/etc/openvpn # openvpn --genkey --secret key # scp -v key root@ip-publica-proxy2:/usr/pkg/etc/openvpn/ # cat > openvpn.conf dev tun1 remote ip-publica-proxy2 ifconfig 10.8.7.2 10.8.7.1 secret key proto udp port 500 (ctrl-d) # echo "openvpn=YES" >> /etc/rc.conf # cp /usr/pkg/share/examples/rc.d/openvpn /etc/rc.d # echo "staticroute=YES" >> /etc/rc.conf # echo "net 192.168.10.0 -netmask 255.255.255.0 10.8.7.1" > /etc/route.conf # /etc/rc.d/openvpn start # /etc/rc.d/staticroute startProxy Red 2:
# sysctl -w net.inet.ip.forwarding=1 # echo "net.inet.ip.forwarding=1" >> /etc/sysctl.conf # cat > /usr/pkg/etc/openvpn/openvpn.conf dev tun1 remote ip-publica-proxy1 ifconfig 10.8.7.1 10.8.7.2 secret key proto udp port 500 (ctrl-d) # echo "openvpn=YES" >> /etc/rc.conf # cp /usr/pkg/share/examples/rc.d/openvpn /etc/rc.d # echo "staticroute=YES" >> /etc/rc.conf # echo "net 192.168.1.0 -netmask 255.255.255.0 10.8.7.2" > /etc/route.conf # /etc/rc.d/openvpn start # /etc/rc.d/staticroute start
0 #:
Publicar un comentario