ich versuche seit einigen Tagen auf meinem root Server nen Openvpn zu installieren.
Bei mir, auf einem Rechner hinter einer Fritzbox läuft das Ganze super.
Jedoch krieg ich's auf dem root Server nicht hin.
VPN Verbindung baut sich auf.
eth0 = static ip beim provider
Traffic wird vom vpn client auf das tun0 interface gesendet.
Traffic geht auch über die eth0 raus, und die Antwort kommt zur eth0 zurück. (tcpdump!)
Jedoch wird dann der Traffic nicht zur tun0 bzw dem vpn client weiter geleitet:
Code: Select all
iptables -L -n -v
Chain INPUT (policy ACCEPT 774 packets, 178K bytes)
pkts bytes target prot opt in out source destination
54 7036 ACCEPT tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:1195
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
52 2721 ACCEPT all -- * eth0 192.168.200.0/24 0.0.0.0/0
0 0 ACCEPT all -- eth0 tun0 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
Chain OUTPUT (policy ACCEPT 282 packets, 83271 bytes)
pkts bytes target prot opt in out source destination
55 2365 ACCEPT tcp -- * eth0 0.0.0.0/0 0.0.0.0/0 tcp spt:1195
Code: Select all
iptables -L -n -v -t nat
Chain PREROUTING (policy ACCEPT 128 packets, 10091 bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 17 packets, 1303 bytes)
pkts bytes target prot opt in out source destination
25 1357 MASQUERADE all -- * eth0 192.168.200.0/24 0.0.0.0/0
Chain OUTPUT (policy ACCEPT 17 packets, 1303 bytes)
pkts bytes target prot opt in out source destination
Code: Select all
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.200.2 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
192.168.200.0 192.168.200.2 255.255.255.0 UG 0 0 0 tun0
public network 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 public_network_gw 0.0.0.0 UG 0 0 0 eth0
Code: Select all
cat /proc/sys/net/ipv4/ip_forward
1
Code: Select all
dev tun
proto tcp-server
comp-lzo
port 1195
#mode server
ifconfig-pool-persist ipp.txt
server 192.168.200.0 255.255.255.0
push "route 192.168.200.0 255.255.255.0"
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
keepalive 10 120
max-clients 5
user nobody
group nogroup
status /var/log/openvpn-status.log
log-append /var/log/openvpn.log
verb 3
mute 10
ca /etc/openvpn/ca.crt
cert /etc/openvpn/server.crt
key /etc/openvpn/server.key
dh /etc/openvpn/dh1024.pem
#tls-server
persist-key
persist-tun
tls-auth ta.key 0
#client-to-client
#chroot /tmp
#mssfix 1200
Code: Select all
eth0 Link encap:Ethernet HWaddr 00:19:99:b2:44:a0
inet addr:pub_ip Bcast:pub_net Mask:255.255.255.0
inet6 addr: xxxxxxx/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:622790856 errors:0 dropped:0 overruns:0 frame:0
TX packets:1174283411 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:61040511529 (56.8 GiB) TX bytes:1730264148513 (1.5 TiB)
Interrupt:18
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:16436 Metric:1
RX packets:10819002 errors:0 dropped:0 overruns:0 frame:0
TX packets:10819002 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3445759831 (3.2 GiB) TX bytes:3445759831 (3.2 GiB)
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:192.168.200.1 P-t-P:192.168.200.2 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP 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:100
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Hat jemand ne Idee was hier nicht stimmt?
Besten Dank im Voraus!