MLD-5.x > General

Einfache Anleitung Einrichtung VPN?

(1/4) > >>

horatio:
Ich würde gerne einen IPTV-Dienst aus der Schweiz nutzen, dazu brauche ich einer dauerhafte VPN-Verbindung.
Wie ist der einfachste Weg?

Habe gesehen, dass es ein openVPN Systempaket gibt? Ist das okay? Gibt es eine Anleitung?

Mein VPN Provider bietet folgende Möglichkeiten an:
OpenVPN
L2TP/IPsec
Wireguard
IKE V1 und V2

gr4vity:
Yes, you can install openvpn package.
config files goes to /etc/openvpn

horatio:
I never did that. Do you have a link to an how to?

gr4vity:
Hi,

You don't need any guide, just install openvpn package.
Put your .ovpn config files in /etc/openvpn
cd /etc/openvpn
Then run it manually as follows:


--- Code: ---MLD> openvpn *.ovpn
Thu Mar  3 16:35:09 2022 OpenVPN 2.4.0 arm-unknown-linux-gnueabihf [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Oct 14 2018
Thu Mar  3 16:35:09 2022 library versions: OpenSSL 1.0.2n  7 Dec 2017, LZO 2.10
Thu Mar  3 16:35:09 2022 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Thu Mar  3 16:35:09 2022 TCP/UDP: Preserving recently used remote address: [AF_INET]--:25000
Thu Mar  3 16:35:09 2022 Socket Buffers: R=[180224->180224] S=[180224->180224]
Thu Mar  3 16:35:09 2022 UDP link local: (not bound)
Thu Mar  3 16:35:09 2022 UDP link remote: [AF_INET]--:25000
Thu Mar  3 16:35:13 2022 TLS: Initial packet from [AF_INET]--:25000, sid=48ad5f99 43227113
Thu Mar  3 16:35:14 2022 Control Channel: TLSv1.2, cipher TLSv1/SSLv3 ECDHE-RSA-AES256-GCM-SHA384, 1024 bit RSA
Thu Mar  3 16:35:14 2022  Peer Connection Initiated with [AF_INET]--:25000
Thu Mar  3 16:35:15 2022 SENT CONTROL : 'PUSH_REQUEST' (status=1)
Thu Mar  3 16:35:15 2022 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,dhcp-option DNS  --,dhcp-option DNS  --,route 10.10.0.1,topology net30,ping 5,ping-restart 30,ifconfig 10.10.0.246 10.10.0.245,peer-id 5,cipher AES-256-GCM'
Thu Mar  3 16:35:15 2022 OPTIONS IMPORT: timers and/or timeouts modified
Thu Mar  3 16:35:15 2022 OPTIONS IMPORT: --ifconfig/up options modified
Thu Mar  3 16:35:15 2022 OPTIONS IMPORT: route options modified
Thu Mar  3 16:35:15 2022 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Thu Mar  3 16:35:15 2022 OPTIONS IMPORT: peer-id set
Thu Mar  3 16:35:15 2022 OPTIONS IMPORT: adjusting link_mtu to 1625
Thu Mar  3 16:35:15 2022 OPTIONS IMPORT: data channel crypto options modified
Thu Mar  3 16:35:15 2022 Data Channel Encrypt: Cipher 'AES-256-GCM' initialized with 256 bit key
Thu Mar  3 16:35:15 2022 Data Channel Decrypt: Cipher 'AES-256-GCM' initialized with 256 bit key
Thu Mar  3 16:35:15 2022 ROUTE_GATEWAY 192.168.1.1/255.255.255.0 IFACE=eth0 HWADDR=
Thu Mar  3 16:35:15 2022 TUN/TAP device tun2 opened
Thu Mar  3 16:35:15 2022 TUN/TAP TX queue length set to 100
Thu Mar  3 16:35:15 2022 do_ifconfig, tt->did_ifconfig_ipv6_setup=0
Thu Mar  3 16:35:15 2022 /sbin/ip link set dev tun2 up mtu 1500
Thu Mar  3 16:35:15 2022 /sbin/ip addr add dev tun2 local 10.10.0.246 peer 10.10.0.245
Thu Mar  3 16:35:17 2022 /sbin/ip route add --/32 via 192.168.1.1
Thu Mar  3 16:35:17 2022 /sbin/ip route add 0.0.0.0/1 via 10.10.0.245
Thu Mar  3 16:35:17 2022 /sbin/ip route add 128.0.0.0/1 via 10.10.0.245
Thu Mar  3 16:35:17 2022 /sbin/ip route add 10.10.0.1/32 via 10.10.0.245
Thu Mar  3 16:35:17 2022 Initialization Sequence Completed
--- End code ---

By the way, i noticed there is Webif setup in Network – VPN but i didn't try it

Edit: you can upload vpn config in Webif using Upload vpn config option.


horatio:
Well it's not that easy...

I did as you said, and startet the *ovpn from my provider.
There appeared a new device tun0 until next reboot


--- Code: ---eth0      Link encap:Ethernet  HWaddr F8:32:E4:75:47:B4 
          inet addr:192.168.178.3  Bcast:192.168.178.255  Mask:255.255.255.0
          inet6 addr: 2003:c5:bf13:bf00:fa32:e4ff:fe75:47b4/64 Scope:Global
          inet6 addr: fe80::fa32:e4ff:fe75:47b4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:28076 errors:0 dropped:12022 overruns:0 frame:0
          TX packets:5567 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:7386228 (7.0 MiB)  TX bytes:1949078 (1.8 MiB)
          Memory:df100000-df11ffff

eth1      Link encap:Ethernet  HWaddr F8:32:E4:75:47:B5 
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:16 Memory:df700000-df720000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:17639 errors:0 dropped:0 overruns:0 frame:0
          TX packets:17639 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:128261705 (122.3 MiB)  TX bytes:128261705 (122.3 MiB)

tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 
          inet addr:10.200.0.102  P-t-P:10.200.0.101  Mask:255.255.255.255
          inet6 addr: fe80::7f5d:978d:ab01:9903/64 Scope:Link
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:22 errors:0 dropped:0 overruns:0 frame:0
          TX packets:29 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:3010 (2.9 KiB)  TX bytes:2096 (2.0 KiB)

--- End code ---

I then tried to upload the openvpn file via mld-webportal. It seemed to work.
the ovpn file in /etc/openvpn was deleted then... (?). I do not know what happend, but it is gone!


After a reboot, I think, tun0 seems gone. and I supose i surf without vpn.
How can I see me external IP?
curl ifconfig.me is not working, since I cannot install curl

BTW: But I have noticed that in etc/network/if-down.d and if-up.de I have a file "openvpn"

So, I really do not know if after rebbot I am connected, and if not, how I make the changes persistent.
Thaks for your help

Edit: I could identify me external IP with: wget -O - -q https://api.ipify.org   => I was not connected to vpn after reboot!

Navigation

[0] Message Index

[#] Next page

Go to full version