Re: VPN na VPS
: 24 września 2016, 22:11
Pokaż jeszcze wynik polecenia route
Polski portal użytkowników dystrybucji Debian GNU/Linux, dyskusje, artykuły, nowości, blog, porady, pomoc.
https://593930.wb34atkl.asia/
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
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
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]#
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]#
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]#
Kod: Zaznacz cały
iptables -A POSTROUTING --table nat -s 10.8.0.0/24 -o eth0 -j MASQUERADE
to może zrób to jak człowiek na porządnym systemie czyli debianieale w tym systemie brak tego pliku
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]#