Openvpn

Re: Openvpn

Postnapisał hiuman piątek, 23 marca 2018, 00:36

Chłopaki odgrzeje post. Jak zrobić by po restarcie odpalał się openvpn? Utworzyłem w init.d/autostart.sh
#!/bin/sh
# load module tun.ko
/sbin/insmod /lib/modules/4.10.6/kernel/drivers/net/tun.ko 1>/dev/null 2>/dev/nu
/usr/sbin/openvpn --daemon --config /etc/openvpn/client.conf

Dopisałem również w init.d/rcS
if [ ! -e /dev/net ]; then
mkdir /dev/net
mknod -m 666 /dev/net/tun c 10 200
fi


echo "Load TUN"
insmod $MODDIR/tun.ko


I nic to nie pomaga. Po restarcie sprawdzam lsmod i nie ma tun. Restart z BP-sieć-openvpn nie uruchamia tun. Jedynie wpisanie w konsoli /etc/init.d/openvpn start; tail -f /var/log/messages uruchamia openvpn.
Hyperion5.8 ,formuler F1
Avatar użytkownika
hiuman
 
Posty: 97
Dołączył(a): czwartek, 16 listopada 2017, 15:37
Dekoder:: FORMULER F1

Re: Openvpn

Postnapisał zukon piątek, 23 marca 2018, 08:25

co się dzieje po:
Kod: Zaznacz cały
modprobe tun

?

tun.ko pobrany z feed? Czy jakiś "magiczny" znaleziony gdzieś w sieci? ;) Co po załadowaniu wyświetla się po:
Kod: Zaznacz cały
lsmod

i
Kod: Zaznacz cały
dmesg

?
CZAS NIE &#%$!! NIE STANIE!


Tymczasowy link do pobierania wszystkich image PKT


NIE POMAGAM NA PW!!!
OGLĄDANIE PŁATNEJ TELEWIZJI BEZ OPŁACONEGO ABONAMENTU JEST PRZESTĘPSTWEM
Avatar użytkownika
zukon
Administrator
 
Posty: 9057
Dołączył(a): piątek, 6 marca 2009, 22:13
Lokalizacja: 3miasto
Dekoder:: GI XPeed LX3

Re: Openvpn

Postnapisał hiuman piątek, 23 marca 2018, 11:04

modprobe tun
root@formuler1:~# modprobe tun
root@formuler1:~#


lsmod
root@formuler1:~# lsmod
Module Size Used by
tun 23509 2
fake 894 0
ipv6 426450 47
cdc_acm 20640 0
xfs 800441 0
libcrc32c 1146 1 xfs
formuler1 8162623 39
formuler1_3 34321 1 formuler1
formuler1_2 23103 0
formuler1_1 8765 3 formuler1,formuler1_3,formuler1_2
root@formuler1:~#


dmesg
Kod: Zaznacz cały
root@formuler1:~# dmesg
[    1.128000] hub 8-0:1.0: USB hub found
[    1.128000] hub 8-0:1.0: 1 port detected
[    1.129000] usbcore: registered new interface driver uas
[    1.129000] usbcore: registered new interface driver usb-storage
[    1.129000] mousedev: PS/2 mouse device common for all mice
[    1.129000] i2c /dev entries driver
[    1.129000] usbcore: registered new interface driver btusb
[    1.130000] sdhci: Secure Digital Host Controller Interface driver
[    1.130000] sdhci: Copyright(c) Pierre Ossman
[    1.130000] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.130000] sdhci-brcmstb sdhci-brcmstb.0: Enabling controller
[    1.130000] mmc0: Failed to set 32-bit DMA mask.
[    1.130000] mmc0: No suitable DMA available - falling back to PIO
[    1.162000] mmc0: SDHCI controller on sdhci-brcmstb.0 [sdhci-brcmstb.0] using PIO
[    1.162000] hidraw: raw HID events driver (C) Jiri Kosina
[    1.162000] usbcore: registered new interface driver usbhid
[    1.162000] usbhid: USB HID core driver
[    1.163000] NET: Registered protocol family 17
[    1.163000] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    1.163000] Bluetooth: HIDP socket layer initialized
[    1.163000] Key type dns_resolver registered
[    1.163000] PM: CP0 COUNT/COMPARE frequency does not depend on divisor
[    1.164000] EBI CS0: setting up NAND flash (primary)
[    1.164000] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xdc
[    1.164000] nand: Hynix H27U4G8F2DTR-BC
[    1.164000] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.165000] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xdc
[    1.165000] nand: Hynix H27U4G8F2DTR-BC
[    1.165000] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.165000] brcmnand brcmnand.0: 512MiB total, 128KiB blocks, 2KiB pages, 16B OOB, 8-bit, Hamming ECC
[    1.165000] Bad block table found at page 262080, version 0x01
[    1.165000] Bad block table found at page 262016, version 0x01
[    1.166000] Creating 3 MTD partitions on "brcmnand.0":
[    1.166000] 0x000000500000-0x000020000000 : "complete"
[    1.171000] 0x000000500000-0x000000b00000 : "kernel"
[    1.172000] 0x000000b00000-0x000020000000 : "rootfs"
[    1.176000] ubi0: default fastmap pool size: 200
[    1.176000] ubi0: default fastmap WL pool size: 100
[    1.176000] ubi0: attaching mtd2
[    1.360000] usb 6-1: new full-speed USB device number 2 using ohci-brcm
[    1.397000] usb 3-1: new high-speed USB device number 2 using ehci-brcm
[    1.530000] ubi0: attached by fastmap
[    1.530000] ubi0: fastmap pool size: 200
[    1.530000] ubi0: fastmap WL pool size: 100
[    1.533000] usb-storage 3-1:1.0: USB Mass Storage device detected
[    1.533000] scsi host3: usb-storage 3-1:1.0
[    1.546000] ubi0: attached mtd2 (name "rootfs", size 501 MiB)
[    1.546000] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    1.546000] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    1.546000] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    1.546000] ubi0: good PEBs: 4004, bad PEBs: 4, corrupted PEBs: 0
[    1.546000] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
[    1.546000] ubi0: max/mean erase counter: 27/3, WL threshold: 4096, image sequence number: 1758806439
[    1.546000] ubi0: available PEBs: 0, total reserved PEBs: 4004, PEBs reserved for bad PEB handling: 76
[    1.546000] ubi0: background thread "ubi_bgt0d" started, PID 92
[    1.546000] ALSA device list:
[    1.546000]   No soundcards found.
[    1.546000] Warning: unable to open an initial console.
[    1.548000] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 93
[    1.697000] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[    1.697000] UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    1.697000] UBIFS (ubi0:0): FS size: 496603136 bytes (473 MiB, 3911 LEBs), journal size 9023488 bytes (8 MiB, 72 LEBs)
[    1.697000] UBIFS (ubi0:0): reserved for root: 0 bytes (0 KiB)
[    1.697000] UBIFS (ubi0:0): media format: w4/r0 (latest is w5/r0), UUID D46AD4B7-367A-4846-8079-5F3F552B68F9, small LPT model
[    1.699000] VFS: Mounted root (ubifs filesystem) on device 0:12.
[    1.700000] devtmpfs: mounted
[    1.700000] Freeing unused kernel memory: 284K
[    1.700000] This architecture does not have kernel memory protection.
[    1.985000] random: crng init done
[    2.593000] scsi 3:0:0:0: Direct-Access     Kingston DataTraveler 3.0      PQ: 0 ANSI: 6
[    2.594000] sd 3:0:0:0: Attached scsi generic sg0 type 0
[    2.595000] sd 3:0:0:0: [sda] 15109516 512-byte logical blocks: (7.74 GB/7.20 GiB)
[    2.596000] sd 3:0:0:0: [sda] Write Protect is off
[    2.596000] sd 3:0:0:0: [sda] Mode Sense: 4f 00 00 00
[    2.597000] sd 3:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    2.603000]  sda: sda1
[    2.606000] sd 3:0:0:0: [sda] Attached SCSI removable disk
[    3.148000] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[    3.512000] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 320)
[    3.512000] ata2.00: ATA-9: WDC WD5000LPVX-00V0TT0, 01.01A01, max UDMA/133
[    3.512000] ata2.00: 976773168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    3.513000] ata2.00: configured for UDMA/133
[    3.513000] ata2: EH complete
[    3.513000] scsi 1:0:0:0: Direct-Access     ATA      WDC WD5000LPVX-0 1A01 PQ: 0 ANSI: 5
[    3.522000] sd 1:0:0:0: Attached scsi generic sg1 type 0
[    3.522000] sd 1:0:0:0: [sdb] 976773168 512-byte logical blocks: (500 GB/466 GiB)
[    3.522000] sd 1:0:0:0: [sdb] 4096-byte physical blocks
[    3.522000] sd 1:0:0:0: [sdb] Write Protect is off
[    3.522000] sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[    3.522000] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.552000]  sdb: sdb1 sdb2 sdb3
[    3.554000] sd 1:0:0:0: [sdb] Attached SCSI disk
[    4.000000] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[    4.116000] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
[    4.686000] EXT4-fs (sdb3): mounted filesystem with ordered data mode. Opts: (null)
[    7.492000] EXT4-fs (sdb2): VFS: Can't find ext4 filesystem
[    7.492000] EXT4-fs (sdb2): VFS: Can't find ext4 filesystem
[   11.557000] formuler1_1: module_layout: kernel tainted.
[   11.557000] Disabling lock debugging due to kernel taint
[   11.557000] formuler1_1: loading out-of-tree module taints kernel.
[   11.561000] usbcore: registered new interface driver tpm
[   16.941000] input: dreambox remote control (native) as /devices/virtual/input/input0
[   16.942000] input: dreambox advanced remote control (native) as /devices/virtual/input/input1
[   17.016000] dvbdev: DVB: registering new adapter (dvb0)
[   17.019000] platform dvb0.0: DVB: registering adapter 0 frontend 0 (DVB-S2)...
[   17.037000] platform dvb0.0: DVB: registering adapter 0 frontend 1 (DVB-S2)...
[   17.361000] input: front panel as /devices/virtual/input/input2
[   17.422000] Registered IR keymap rc-cec
[   17.422000] input: RC for hdmi_cec as /devices/platform/hdmi.0/rc/rc0/input3
[   17.423000] rc rc0: RC for hdmi_cec as /devices/platform/hdmi.0/rc/rc0
[   17.713000] SGI XFS with security attributes, realtime, no debug enabled
[   20.348000] Adding 1052252k swap on /dev/sdb2.  Priority:-1 extents:1 across:1052252k
[   22.147000] usbcore: registered new interface driver cdc_acm
[   22.147000] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[   25.749000] NET: Registered protocol family 10
[   25.761000] Segment Routing with IPv6
[   26.092000] __clk_enable: network [1]
[   26.092000] __clk_enable: enet [1]
[   26.092000] bcm40nm_pm_genet_enable 00
[   26.216000] bcmgenet bcmgenet.0: configuring instance for external RGMII (TX delay)
[   26.216000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   27.362000] bcmgenet bcmgenet.0 eth0: Link is Down
[   28.461000] bcmgenet bcmgenet.0 eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[   28.461000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   36.887000] UBIFS error (ubi0:0 pid 837): ubifs_read_node: bad node type (255 but expected 2)
[   36.887000] UBIFS error (ubi0:0 pid 837): ubifs_read_node: bad node at LEB 45:95680, LEB mapping status 0
[   36.887000] Not a node, first 24 bytes:
[   36.887000] 00000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff                          ........................
[   36.887000] CPU: 0 PID: 837 Comm: S17autofs Tainted: GF          O    4.10.6 #2
[   36.887000] Stack : 00000000 00000000 809e7fea 00000043 00000000 809e7fe8 808bfd78 00000009
[   36.887000]         ceddda24 809481e7 80883284 00000000 00000345 809e39cc 00010000 00000000
[   36.887000]         00000008 80080b44 808c0000 808c018c 80883880 00000000 8088a2a0 cede3b0c
[   36.887000]         0000002d 800cc4c4 cf64a800 00000002 00000073 00000000 cede3b0c ceddd680
[   36.887000]         00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   36.887000]         ...
[   36.887000] Call Trace:
[   36.887000] [<8000f55c>] show_stack+0x88/0xa4
[   36.887000] [<803cd4a8>] dump_stack+0xd8/0x110
[   36.887000] [<8031957c>] ubifs_read_node+0x18c/0x2e4
[   36.887000] [<8033a470>] ubifs_tnc_read_node+0xf0/0x100
[   36.887000] [<8031aa98>] tnc_read_hashed_node+0x11c/0x240
[   36.887000] [<8031d584>] ubifs_tnc_locate+0x210/0x268
[   36.887000] [<8031de6c>] ubifs_tnc_lookup_nm+0x38/0x160
[   36.887000] [<80310330>] ubifs_lookup+0x1bc/0x330
[  157.882000] tun: Universal TUN/TAP device driver, 1.6
[  157.882000] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[  672.068000] sh (2049): drop_caches: 3
[  827.767000] UBIFS error (ubi0:0 pid 1707): ubifs_read_node: bad node type (255 but expected 2)
[  827.768000] UBIFS error (ubi0:0 pid 1707): ubifs_read_node: bad node at LEB 45:95680, LEB mapping status 0
[  827.768000] Not a node, first 24 bytes:
[  827.768000] 00000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff                          ........................
[  827.768000] CPU: 1 PID: 1707 Comm: vsftpd Tainted: GF          O    4.10.6 #2
[  827.768000] Stack : 00000000 00000000 809e7fea 00000041 00000000 809e7fe8 808bfd78 00000009
[  827.768000]         caca6ca4 809481e7 80883284 00000001 000006ab 809e39cc 00010000 cf533900
[  827.768000]         808b0000 80080b44 808c0000 808c018c 80883880 00000000 8088a2a0 cb681cdc
[  827.768000]         0000002d 800cc4c4 cb645400 00000002 0000008c 00000000 cb681cdc caca6900
[  827.768000]         00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  827.768000]         ...
[  827.768000] Call Trace:
[  827.768000] [<8000f55c>] show_stack+0x88/0xa4
[  827.768000] [<803cd4a8>] dump_stack+0xd8/0x110
[  827.768000] [<8031957c>] ubifs_read_node+0x18c/0x2e4
[  827.768000] [<8033a470>] ubifs_tnc_read_node+0xf0/0x100
[  827.768000] [<8031aa98>] tnc_read_hashed_node+0x11c/0x240
[  827.768000] [<8031efcc>] ubifs_tnc_next_ent+0x1d0/0x1e8
[  827.768000] [<8030fd84>] ubifs_readdir+0x1b4/0x5a4
[  827.768000] [<8014a728>] iterate_dir+0x78/0x23c
[  827.768000] [<8014aec8>] SyS_getdents64+0x7c/0x164
[  827.768000] [<80015df4>] syscall_common+0x34/0x58
[  827.768000] UBIFS error (ubi0:0 pid 1707): ubifs_readdir: cannot find next direntry, error -22
[ 1272.677000] sh (3089): drop_caches: 3
[ 1873.222000] sh (4029): drop_caches: 3
[ 2473.811000] sh (5289): drop_caches: 3
[ 3074.359000] sh (6268): drop_caches: 3
[ 3674.654000] sh (7143): drop_caches: 3
[ 4274.967000] sh (7800): drop_caches: 3
[ 4875.436000] sh (8302): drop_caches: 3
[ 5475.982000] sh (8847): drop_caches: 3
[ 6076.435000] sh (9353): drop_caches: 3
[ 6676.867000] sh (9817): drop_caches: 3
[ 7277.432000] sh (10358): drop_caches: 3
[ 7877.916000] sh (10895): drop_caches: 3
[ 8478.451000] sh (11177): drop_caches: 3
[ 9078.909000] sh (11615): drop_caches: 3
[ 9679.289000] sh (12130): drop_caches: 3
[10279.737000] sh (12748): drop_caches: 3
[10880.255000] sh (13375): drop_caches: 3
[11480.773000] sh (13648): drop_caches: 3
[12081.247000] sh (14018): drop_caches: 3
[12681.724000] sh (14608): drop_caches: 3
[13282.094000] sh (15114): drop_caches: 3
[13882.541000] sh (15628): drop_caches: 3
[14482.980000] sh (16064): drop_caches: 3
[15083.442000] sh (16451): drop_caches: 3
[15683.930000] sh (17062): drop_caches: 3
[16284.398000] sh (17665): drop_caches: 3
[16884.828000] sh (18223): drop_caches: 3
[17485.264000] sh (18979): drop_caches: 3
[18085.867000] sh (19678): drop_caches: 3
[18686.259000] sh (20447): drop_caches: 3
[19286.805000] sh (21121): drop_caches: 3
[19887.273000] sh (21894): drop_caches: 3
[20487.635000] sh (22417): drop_caches: 3
[21088.023000] sh (22968): drop_caches: 3
[21688.554000] sh (23523): drop_caches: 3
[22289.095000] sh (24103): drop_caches: 3
[22889.612000] sh (24491): drop_caches: 3
[23489.992000] sh (25141): drop_caches: 3
[24090.169000] sh (25467): drop_caches: 3
[24690.323000] sh (25494): drop_caches: 3
[25290.477000] sh (25521): drop_caches: 3
[25890.627000] sh (25545): drop_caches: 3
[26490.781000] sh (25572): drop_caches: 3
[27090.975000] sh (25598): drop_caches: 3
[27691.126000] sh (25623): drop_caches: 3
[28291.279000] sh (25650): drop_caches: 3
[28891.434000] sh (25677): drop_caches: 3
[29491.584000] sh (25701): drop_caches: 3
[30091.931000] sh (26215): drop_caches: 3
[30692.355000] sh (26835): drop_caches: 3
[31292.871000] sh (27395): drop_caches: 3
[31893.351000] sh (27866): drop_caches: 3
[32493.880000] sh (28239): drop_caches: 3
[33094.358000] sh (28729): drop_caches: 3
[33694.769000] sh (29606): drop_caches: 3
[34295.206000] sh (30207): drop_caches: 3
[34895.517000] sh (30739): drop_caches: 3
[35495.992000] sh (31301): drop_caches: 3
[36096.401000] sh (32102): drop_caches: 3
[36696.775000] sh (32626): drop_caches: 3
[37297.275000] sh (680): drop_caches: 3
[37897.641000] sh (1230): drop_caches: 3
[38498.078000] sh (1618): drop_caches: 3
[39098.358000] sh (2114): drop_caches: 3
[39698.785000] sh (2562): drop_caches: 3
root@formuler1:~#


tun.ko pobrany z feed. Instalowałem również z postu
zukon napisał(a):Prawdę powiedziawszy na FEED dałem pliki z Hyperiona 5.7 (bo wszystko z 5.6 musiałem usunąć) i widzę, że się trochę zmieniły - spróbuj:
Kod: Zaznacz cały
opkg install kernel-module-tun-4.10.6


Edit jak nie pomoże:
- daj:
Kod: Zaznacz cały
opkg install kernel-module-tun-4.10.6 --force-reinstall

- ostateczność: pobierz moduł, otwórz w 7 zip i wgraj zgodnie ze struktura katalogów


Edit Mod:
przypominam o stosowaniu [Code] przy wstawianiu loga do posta !
Avatar użytkownika
hiuman
 
Posty: 97
Dołączył(a): czwartek, 16 listopada 2017, 15:37
Dekoder:: FORMULER F1

Re: Openvpn

Postnapisał kafarowski niedziela, 25 marca 2018, 15:46

Ja mam mniej elegancko(bez init.d/rcS ) podobny skrypt autostart.sh i działa - jeszcze poprzednia wersja hyperiona w F1.
Pobrane:
Kod: Zaznacz cały
opkg list | grep tun
opkg install kernel-module-tun-4.10.6

Skrypt:
Kod: Zaznacz cały
#!/bin/sh
# load module tun.ko
/sbin/insmod /lib/modules/4.10.6/kernel/drivers/net/tun.ko 1>/dev/null 2>/dev/null && LOADED=1
/usr/sbin/openvpn --daemon --config /etc/openvpn/moj.ovpn

Aktywacja:
Kod: Zaznacz cały
update-rc.d -v autostart.sh start 99 3 .

Wiem, że prostacko od siekiery i da się bardziej elegancko.
Avatar użytkownika
kafarowski
 
Posty: 67
Dołączył(a): niedziela, 26 maja 2013, 12:40
Dekoder:: AX HD51

Re: Openvpn

Postnapisał hiuman niedziela, 25 marca 2018, 18:44

Już sobie poradziłem i na chwilę obecną po każdym restarcie openvpn startuje sam.
Do init.d/rcS dopisałem jeszcze:
Kod: Zaznacz cały
#!/bin/sh
/usr/local/sbin/openvpn --daemon --config /etc/openvpn/client.conf


Jest fajny plugin, pokazujący jaki posiadamy adres IP i w jakim jest kraju.
Obrazek
enigma2-plugin-extensions-vpnchanger_1.2.9_all.ipk
Avatar użytkownika
hiuman
 
Posty: 97
Dołączył(a): czwartek, 16 listopada 2017, 15:37
Dekoder:: FORMULER F1

Poprzednia strona

Powrót do Pluginy

Kto przegląda forum

Użytkownicy przeglądający ten dział: Brak zidentyfikowanych użytkowników i 8 gości