[+] VPN na VPS
Re: VPN na VPS
Pokaż jeszcze wynik polecenia route
Re: VPN na VPS
klienta na windowsie czy serwera?
Re: VPN na VPS
pokaż (na serwerze):
Kod: Zaznacz cały
ifconfig
Kod: Zaznacz cały
cat /etc/sysctl.conf
Kod: Zaznacz cały
iptables -nvL
Kod: Zaznacz cały
systemctl status openvpn
Re: VPN na VPS
ifconfig
/etc/sysctl.conf
iptables -nvL
route -n
systemctl status openvpn
Kod: Zaznacz cały
[root@centos /]# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 217.61.1.233 netmask 255.255.255.0 broadcast 217.61.1.255
inet6 fe80::250:56ff:fe9f:3d66 prefixlen 64 scopeid 0x20<link>
ether 00:50:56:9f:3d:66 txqueuelen 1000 (Ethernet)
RX packets 58219 bytes 4454245 (4.2 MiB)
RX errors 0 dropped 4114 overruns 0 frame 0
TX packets 5779 bytes 530675 (518.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet 10.8.0.1 netmask 255.255.255.255 destination 10.8.0.2
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 100 (UNSPEC)
RX packets 1436 bytes 87189 (85.1 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 12 bytes 1356 (1.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@centos /]#
Kod: Zaznacz cały
# System default settings live in /usr/lib/sysctl.d/00-system.conf.
# To override those settings, enter new settings here, or in an /etc/sysctl.d/<name>.conf file
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
net.ipv4.ip_forward = 1
iptables -nvL
Kod: Zaznacz cały
[root@centos openvpn]# iptables -nvL
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
[root@centos openvpn]#
route -n
Kod: Zaznacz cały
[root@centos openvpn]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 217.61.1.1 0.0.0.0 UG 0 0 0 eth0
10.8.0.0 10.8.0.2 255.255.255.0 UG 0 0 0 tun0
10.8.0.2 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
217.61.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
[root@centos openvpn]#
systemctl status openvpn
Kod: Zaznacz cały
[root@centos openvpn]# systemctl status openvpn
● openvpn.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
[root@centos openvpn]#
Re: VPN na VPS
wpuść w /etc/rc.local
i restart serwera
Kod: Zaznacz cały
iptables -A POSTROUTING --table nat -s 10.8.0.0/24 -o eth0 -j MASQUERADE
Ostatnio zmieniony 24 września 2016, 22:42 przez Xela, łącznie zmieniany 4 razy.
Re: VPN na VPS
leci restart..............
Re: VPN na VPS
nie zauwazylem, ze mam to umiescic w rc.local ale w tym systemie brak tego pliku
Re: VPN na VPS
pokaż jeszcze raz
/etc/init.d/openvpn status
https://www.digitalocean.com/community/ ... n-debian-8
/etc/init.d/openvpn status
to może zrób to jak człowiek na porządnym systemie czyli debianieale w tym systemie brak tego pliku
https://www.digitalocean.com/community/ ... n-debian-8
Ostatnio zmieniony 24 września 2016, 22:50 przez Xela, łącznie zmieniany 1 raz.
Re: VPN na VPS
Kod: Zaznacz cały
[root@centos gambi]# /etc/init.d/openvpn status
bash: /etc/init.d/openvpn: No such file or directory
[root@centos gambi]#