Hehe tylko widzisz, autocada ogarnalem, bo pracuje z nim na co dzien i mam ok. 15 lat doswiadczenia na nim. To o czym pisalem z openwrt to dla mnie nieznane lady, ktore musze odkrywac na nowo. Myslalem, ze dla osob ktore siedza w openwrt, bedzie to taka sama pestka jak dla mnie zrobienie wzglednie prostego plugina do autocada, ale jesli nie, to trudno. Tymczasem sprobowalem na najnowszym luci i oto co mi wyszlo:
root@OpenWrt:~# opkg update
Downloading http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/base/Packages.gz.
Updated list of available packages in /var/opkg-lists/barrier_breaker_base.
Downloading http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/luci/Packages.gz.
Updated list of available packages in /var/opkg-lists/barrier_breaker_luci.
Downloading http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/management/Packages.gz.
Updated list of available packages in /var/opkg-lists/barrier_breaker_management.
Downloading http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/oldpackages/Packages.gz.
Updated list of available packages in /var/opkg-lists/barrier_breaker_oldpackages.
Downloading http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/packages/Packages.gz.
Updated list of available packages in /var/opkg-lists/barrier_breaker_packages.
Downloading http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/routing/Packages.gz.
Updated list of available packages in /var/opkg-lists/barrier_breaker_routing.
Downloading http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/telephony/Packages.gz.
Updated list of available packages in /var/opkg-lists/barrier_breaker_telephony.
Downloading http://dl.eko.one.pl/barrier_breaker/ar71xx/packages/Packages.gz.
Updated list of available packages in /var/opkg-lists/eko1.
root@OpenWrt:~# opkg install openvpn-openssl openvpn-easy-rsa
Installing openvpn-openssl (2.3.6-2) to root...
Downloading http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/base/openvpn-openssl_2.3.6-2_ar71xx.ipk.
Installing kmod-tun (3.10.49-1) to root...
Downloading http://dl.eko.one.pl/barrier_breaker/ar71xx/packages/kmod-tun_3.10.49-1_ar71xx.ipk.
Installing liblzo (2.08-1) to root...
Downloading http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/base/liblzo_2.08-1_ar71xx.ipk.
Installing openvpn-easy-rsa (2013-01-30-2) to root...
Downloading http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/base/openvpn-easy-rsa_2013-01-30-2_ar71xx.ipk.
Installing openssl-util (1.0.2a-0) to root...
Downloading http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/base/openssl-util_1.0.2a-0_ar71xx.ipk.
build-caConfiguring kmod-tun.
Configuring openssl-util.
Configuring liblzo.
Configuring openvpn-openssl.
Configuring openvpn-easy-rsa.
root@OpenWrt:~# build-ca
NOTE: If you run ./clean-all, I will be doing a rm -rf on /etc/easy-rsa/keys
Generating a 2048 bit RSA private key
.....+++
.......................................................+++
writing new private key to 'ca.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [US]:PL
State or Province Name (full name) [CA]:Silesia
Locality Name (eg, city) [SanFrancisco]:Gliwice
Organization Name (eg, company) [Fort-Funston]:Home
Organizational Unit Name (eg, section) [MyOrganizationalUnit]:Home
Common Name (eg, your name or your server's hostname) [Fort-Funston CA]:OpenWRT Server
Name [EasyRSA]:Router
Email Address [me@myhost.mydomain]:badziewiak@jakasPoczta.com
root@OpenWrt:~# build-dh
NOTE: If you run ./clean-all, I will be doing a rm -rf on /etc/easy-rsa/keys
Generating DH parameters, 2048 bit long safe prime, generator 2
This is going to take a long time
...............................................................................................................+.....................................................................+........................+................................................................................................................................................................................................................+...........................................................................................................................................................................................................+..................................................................................+........................................................................................................+............................................................................................................................................................................................................................................................................................................+..................................................................................+...................................................................................................+............................+...............................................................................+..+...........................................................................................+.......................................................................................................................+...................................+.....+.................................+.........+.............+..............................................................+...............................................................................+.....................................................+......................+.....................+.................................................................................+......+..................................................................................................................................................................................+.....................................................................+..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................+...........................................................................................+..........................................................................................+..............................................+................................................................................................................................................................................................................................................................+......................................................+...............................+.............................................................................................+.............+......................................................+....................................................................................+.......................+...............................................................+..................................................................+........................+..........+.+...............................................................................................................................................................................................................................................................................+...........+...........................................+................................................................................................................................+.......................................................................................................................................................................................+...............................+..............+.......................................................................+............................................................................................................................................................................................................................................................................................................................................................................................................................................................................+................................+.+.+.......+.....................................................................+...........................................................................................................................................................+...........................................................................................................................+.........................................................................................................................+...........................+...........................................+.........................+......................................................+........................................................................................................................................................................................................................................................................................................++*++*
root@OpenWrt:~# build-key-server serwer
NOTE: If you run ./clean-all, I will be doing a rm -rf on /etc/easy-rsa/keys
Generating a 2048 bit RSA private key
...........+++
...................................................................+++
writing new private key to 'serwer.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [US]:PL
State or Province Name (full name) [CA]:Silesia
Locality Name (eg, city) [SanFrancisco]:Gliwice
Organization Name (eg, company) [Fort-Funston]:Home
Organizational Unit Name (eg, section) [MyOrganizationalUnit]:Home
Common Name (eg, your name or your server's hostname) [serwer]:OpenWRT Server
Name [EasyRSA]:Router
Email Address [me@myhost.mydomain]:badziewiak@jakasPoczta.com
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
Using configuration from /etc/easy-rsa/openssl-1.0.0.cnf
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
countryName :PRINTABLE:'PL'
stateOrProvinceName :PRINTABLE:'Silesia'
localityName :PRINTABLE:'Gliwice'
organizationName :PRINTABLE:'Home'
organizationalUnitName:PRINTABLE:'Home'
commonName :PRINTABLE:'OpenWRT Server'
name :PRINTABLE:'Router'
emailAddress :IA5STRING:'badziewiak@jakasPoczta.com'
Certificate is to be certified until May 28 14:12:06 2025 GMT (3650 days)
Sign the certificate? [y/n]:y
1 out of 1 certificate requests certified, commit? [y/n]y
Write out database with 1 new entries
Data Base Updated
root@OpenWrt:~# build-key-pkcs12 abcPraca
NOTE: If you run ./clean-all, I will be doing a rm -rf on /etc/easy-rsa/keys
Generating a 2048 bit RSA private key
.................................................+++
..................................................................+++
writing new private key to 'abcPraca.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [US]:PL
State or Province Name (full name) [CA]:Silesia
Locality Name (eg, city) [SanFrancisco]:Gliwice
Organization Name (eg, company) [Fort-Funston]:Home
Organizational Unit Name (eg, section) [MyOrganizationalUnit]:Home
Common Name (eg, your name or your server's hostname) [abcPraca]:OpenWRT Server
Name [EasyRSA]:Router
Email Address [me@myhost.mydomain]:badziewiak@jakasPoczta.com
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
Using configuration from /etc/easy-rsa/openssl-1.0.0.cnf
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
countryName :PRINTABLE:'PL'
stateOrProvinceName :PRINTABLE:'Silesia'
localityName :PRINTABLE:'Gliwice'
organizationName :PRINTABLE:'Home'
organizationalUnitName:PRINTABLE:'Home'
commonName :PRINTABLE:'OpenWRT Server'
name :PRINTABLE:'Router'
emailAddress :IA5STRING:'badziewiak@jakasPoczta.com'
Certificate is to be certified until May 28 14:14:06 2025 GMT (3650 days)
Sign the certificate? [y/n]:y
failed to update database
TXT_DB error number 2
root@OpenWrt:~# build-key-pkcs12 abcPraca
NOTE: If you run ./clean-all, I will be doing a rm -rf on /etc/easy-rsa/keys
Generating a 2048 bit RSA private key
..........................+++
......................................................................+++
writing new private key to 'abcPraca.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [US]:PL
State or Province Name (full name) [CA]:Silesia
Locality Name (eg, city) [SanFrancisco]:Gliwice
Organization Name (eg, company) [Fort-Funston]:Home
Organizational Unit Name (eg, section) [MyOrganizationalUnit]:Home
Common Name (eg, your name or your server's hostname) [abcPraca]:abc praca
Name [EasyRSA]:Router
Email Address [me@myhost.mydomain]:abcas@jakasPoczta.com
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
Using configuration from /etc/easy-rsa/openssl-1.0.0.cnf
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
countryName :PRINTABLE:'PL'
stateOrProvinceName :PRINTABLE:'Silesia'
localityName :PRINTABLE:'Gliwice'
organizationName :PRINTABLE:'Home'
organizationalUnitName:PRINTABLE:'Home'
commonName :PRINTABLE:'abc praca'
name :PRINTABLE:'Router'
emailAddress :IA5STRING:'abcas@jakasPoczta.com'
Certificate is to be certified until May 28 14:16:15 2025 GMT (3650 days)
Sign the certificate? [y/n]:y
1 out of 1 certificate requests certified, commit? [y/n]y
Write out database with 1 new entries
Data Base Updated
Enter Export Password:
Verifying - Enter Export Password:
root@OpenWrt:~# cp /etc/easy-rsa/keys/ca.crt /etc/easy-rsa/keys/serwer.* /etc/easy-rsa/keys/dh2048.pem /etc/openvpn
root@OpenWrt:~# uci set network.vpn=interface
root@OpenWrt:~# uci set network.vpn.ifname=tun0
root@OpenWrt:~# uci set network.vpn.proto=none
root@OpenWrt:~# uci commit
root@OpenWrt:~# uci add firewall zone
cfg17dc81
root@OpenWrt:~# uci set firewall.@zone[-1].name=vpn
root@OpenWrt:~# uci set firewall.@zone[-1].input=ACCEPT
root@OpenWrt:~# uci set firewall.@zone[-1].forward=ACCEPT
root@OpenWrt:~# uci set firewall.@zone[-1].output=ACCEPT
root@OpenWrt:~# uci set firewall.@zone[-1].network=vpn
root@OpenWrt:~# uci add firewall forwarding
cfg18ad58
root@OpenWrt:~# uci set firewall.@forwarding[-1].src='vpn'
root@OpenWrt:~# uci set firewall.@forwarding[-1].dest='wan'
root@OpenWrt:~# uci add firewall rule
cfg1992bd
root@OpenWrt:~# uci set firewall.@rule[-1].name=OpenVPN
root@OpenWrt:~# uci set firewall.@rule[-1].target=ACCEPT
root@OpenWrt:~# uci set firewall.@rule[-1].src=wan
root@OpenWrt:~# uci set firewall.@rule[-1].proto=udp
root@OpenWrt:~# uci set firewall.@rule[-1].proto=tcp
root@OpenWrt:~# uci set firewall.@rule[-1].dest_port=443
root@OpenWrt:~# uci commit firewall
root@OpenWrt:~# /etc/init.d/network reload
'radio0' is disabled
'radio0' is disabled
root@OpenWrt:~# /etc/init.d/firewall reload
Warning: Unable to locate ipset utility, disabling ipset support
* Clearing IPv4 filter table
* Clearing IPv4 nat table
* Clearing IPv4 mangle table
* Clearing IPv4 raw table
* Populating IPv4 filter table
* Zone 'lan'
* Zone 'wan'
* Zone 'vpn'
Warning: fw3_ipt_rule_append(): Can't find target 'input_vpn_rule'
Warning: fw3_ipt_rule_append(): Can't find target 'output_vpn_rule'
Warning: fw3_ipt_rule_append(): Can't find target 'forwarding_vpn_rule'
* Rule 'Allow-DHCP-Renew'
* Rule 'Allow-Ping'
* Rule 'OpenVPN'
* Forward 'lan' -> 'wan'
* Forward 'vpn' -> 'wan'
* Populating IPv4 nat table
* Zone 'lan'
* Zone 'wan'
* Zone 'vpn'
Warning: fw3_ipt_rule_append(): Can't find target 'prerouting_vpn_rule'
Warning: fw3_ipt_rule_append(): Can't find target 'postrouting_vpn_rule'
* Populating IPv4 mangle table
* Zone 'lan'
* Zone 'wan'
* Zone 'vpn'
* Populating IPv4 raw table
* Zone 'lan'
* Zone 'wan'
* Zone 'vpn'
* Clearing IPv6 filter table
* Clearing IPv6 mangle table
* Clearing IPv6 raw table
* Populating IPv6 filter table
* Zone 'lan'
* Zone 'wan'
* Zone 'vpn'
Warning: fw3_ipt_rule_append(): Can't find target 'input_vpn_rule'
Warning: fw3_ipt_rule_append(): Can't find target 'output_vpn_rule'
Warning: fw3_ipt_rule_append(): Can't find target 'forwarding_vpn_rule'
* Rule 'Allow-DHCPv6'
* Rule 'Allow-ICMPv6-Input'
* Rule 'Allow-ICMPv6-Forward'
* Rule 'OpenVPN'
* Forward 'lan' -> 'wan'
* Forward 'vpn' -> 'wan'
* Populating IPv6 mangle table
* Zone 'lan'
* Zone 'wan'
* Zone 'vpn'
* Populating IPv6 raw table
* Zone 'lan'
* Zone 'wan'
* Zone 'vpn'
* Set tcp_ecn to off
* Set tcp_syncookies to on
* Set tcp_window_scaling to on
* Running script '/usr/share/miniupnpd/firewall.include'
Zrobilem to na najnowszym luci na 1043NDv2, po firstboot. Gdzie popelnilem blad?
MiniPC 6xRJ45 2Gb, N100, 16GB DDR5, 1TB NVMe (Gargoyle)
Linksys WRT3200ACM (Gargoyle)
Tp-link 1043NDv2 (Gargoyle)