---------------------------------[Internet]---------------------------------------------
192.168.178.1 192.168.182.1
7050 als VPN Server (7170 als Client )
| | | | | |
+------+ | | +------+ +------+ +------+
| | | | | |
PC-1 | | PC-2 PC-1 PC-2
192.168.178.9 | | 192.168.178.10 192.168.182.11 192.168.182.10
| |
| |
+---------+ +---------+
| |
PC-3 PC-4
192.168.178.110 192.168.178.100
# Konfiguration Fritz!-Box 7050 Server
# # # # # # # # # Start des telnet-daemons
/usr/sbin/telnetd -l /sbin/ar7login
while !(ping -c 1 http://xxxx.de); do
sleep 7
done
# change dir
cd /var/tmp
# set hostname to fritz.box
hostname fritz.box
# Create tun-device
mknod /var/tmp/tun c 10 200
# Create Directory
mkdir /var/tmp/openvpn
# Change dir
cd /var/tmp/openvpn
# copy files
wget http://xxxx/openvpn
wget http://xxxx/ca.crt
wget http://xxxx/server.crt
wget http://xxxx/server.key
wget http://xxxx/server.ovpn
wget http://xxxx/dh1024.pem
# make them executable
chmod +x /var/tmp/openvpn/openvpn
# set rights
chmod 600 /var/tmp/openvpn/server.ovpn
chmod 600 /var/tmp/openvpn/server.key
# start OpenVPN
/var/tmp/openvpn/openvpn --cd /var/tmp/openvpn --config server.ovpn
##########################################
# OpenVPN v2.0.9 config:
#
##########################################
# Grundsaetzliches
port 1194
proto tcp
dev tap
dev-node /var/tmp/tun
##########################################
# Server-Einstellungen
mode server
tls-server
server-bridge 192.168.178.1 255.255.255.0 192.168.178.40 192.168.178.50
# IP-Adresse der 7050 (Gateway), Subnetmask 7050, Start der VPN DHCP Range, Ende der VPN DHCP Range. Die VPN DHCP Range muss ausserhalb der 7050 DHCP Range aber im selben Netz liegen
client-to-client
daemon
##########################################
# Dies ist der IP-Bereich von eurem FritzBox-LAN
push "route 192.168.178.0 255.255.255.0"
##########################################
# Authentifizierung und Verschluesselung
# Hier auf die richtigen Dateinamen achten!
ca /var/tmp/openvpn/ca.crt
cert /var/tmp/openvpn/server.crt
key /var/tmp/openvpn/server.key
dh /var/tmp/openvpn/dh1024.pem
auth SHA1
cipher AES-256-CBC
###########################################
# Sonstiges
verb 3
ping 10
push "ping 10"
ping-restart 60
push "ping-restart 60"
persist-key
persist-tun
log /var/tmp/openvpn/openvpn.log
Sun Apr 15 11:29:14 2007 MULTI: multi_create_instance called
Sun Apr 15 11:29:14 2007 Re-using SSL/TLS context
Sun Apr 15 11:29:14 2007 Control Channel MTU parms [ L:1591 D:140 EF:40 EB:0 ET:
0 EL:0 ]
Sun Apr 15 11:29:14 2007 Data Channel MTU parms [ L:1591 D:1450 EF:59 EB:4 ET:32
EL:0 ]
Sun Apr 15 11:29:14 2007 Local Options hash (VER=V4): 'fbeb66e6'
Sun Apr 15 11:29:14 2007 Expected Remote Options hash (VER=V4): 'b60e7885'
Sun Apr 15 11:29:14 2007 TCP connection established with 84.180.159.252:3865
Sun Apr 15 11:29:14 2007 Socket Buffers: R=[131072->131072] S=[131072->131072]
Sun Apr 15 11:29:14 2007 TCPv4_SERVER link local: [undef]
Sun Apr 15 11:29:14 2007 TCPv4_SERVER link remote: 84.180.159.252:3865
Sun Apr 15 11:29:15 2007 84.180.159.252:3865 TLS: Initial packet from 84.180.159
.252:3865, sid=67b53d1d 7cb44aae
Sun Apr 15 11:29:18 2007 84.180.159.252:3865 VERIFY OK: depth=1, /C=DE/ST=DE/L=123/O=TS/OU=TS/CN=serverbox/[email protected]
Sun Apr 15 11:29:18 2007 84.180.159.252:3865 VERIFY OK: depth=0, /C=DE/ST=DE/O=T
S/OU=TS/CN=client2/[email protected]
Sun Apr 15 11:29:18 2007 84.180.159.252:3865 Data Channel Encrypt: Cipher 'AES-2
56-CBC' initialized with 256 bit key
Sun Apr 15 11:29:18 2007 84.180.159.252:3865 Data Channel Encrypt: Using 160 bit
message hash 'SHA1' for HMAC authentication
Sun Apr 15 11:29:18 2007 84.180.159.252:3865 Data Channel Decrypt: Cipher 'AES-2
56-CBC' initialized with 256 bit key
Sun Apr 15 11:29:18 2007 84.180.159.252:3865 Data Channel Decrypt: Using 160 bit
message hash 'SHA1' for HMAC authentication
Sun Apr 15 11:29:19 2007 84.180.159.252:3865 Control Channel: TLSv1, cipher TLSv
1/SSLv3 DHE-RSA-AES256-SHA, 1024 bit RSA
Sun Apr 15 11:29:19 2007 84.180.159.252:3865 [client2] Peer Connection Initiated
with 84.180.159.252:3865
Sun Apr 15 11:29:20 2007 client2/84.180.159.252:3865 PUSH: Received control mess
age: 'PUSH_REQUEST'
Sun Apr 15 11:29:20 2007 client2/84.180.159.252:3865 SENT CONTROL [client2]: 'PU
SH_REPLY,route 192.168.178.0 255.255.255.0,ping 10,ping-restart 60,route-gateway
192.168.178.1,ifconfig 192.168.178.41 255.255.255.0' (status=1)
Sun Apr 15 11:30:08 2007 client2/84.180.159.252:3865 MULTI: Learn: 00:15:0c:f7:a
0:d4 -> client2/84.180.159.252:3865
Sun Apr 15 11:30:08 2007 client2/84.180.159.252:3865 MULTI: Learn: 00:12:0e:2b:4
b:59 -> client2/84.180.159.252:3865
Sun Apr 15 11:31:07 2007 client2/84.180.159.252:3865 MULTI: Learn: 00:01:e3:0a:e
5:0c -> client2/84.180.159.252:3865
Sun Apr 15 11:35:01 2007 client2/84.180.159.252:3865 MULTI: Learn: 00:0e:35:b3:f
f:c4 -> client2/84.180.159.252:3865
#
# ping 192.168.178.40
PING 192.168.178.40 (192.168.178.40): 56 data bytes
84 bytes from 192.168.178.40: icmp_seq=0 ttl=128 time=247.4 ms
84 bytes from 192.168.178.40: icmp_seq=1 ttl=128 time=118.0 ms
84 bytes from 192.168.178.40: icmp_seq=2 ttl=128 time=347.8 ms
84 bytes from 192.168.178.40: icmp_seq=3 ttl=128 time=97.5 ms
--- 192.168.178.40 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 97.5/202.6/347.8 ms
# ping 192.168.178.41
PING 192.168.178.41 (192.168.178.41): 56 data bytes
84 bytes from 192.168.178.41: icmp_seq=0 ttl=64 time=332.1 ms
84 bytes from 192.168.178.41: icmp_seq=1 ttl=64 time=347.7 ms
84 bytes from 192.168.178.41: icmp_seq=2 ttl=64 time=207.6 ms
84 bytes from 192.168.178.41: icmp_seq=3 ttl=64 time=195.7 ms
84 bytes from 192.168.178.41: icmp_seq=4 ttl=64 time=292.0 ms
84 bytes from 192.168.178.41: icmp_seq=5 ttl=64 time=254.0 ms
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.180.1 * 255.255.255.255 UH 2 0 0 dsl
192.168.180.2 * 255.255.255.255 UH 2 0 0 dsl
192.168.178.0 * 255.255.255.0 U 0 0 0 lan
default * 0.0.0.0 U 2 0 0 dsl
#
# Konfiguration Fritz!-Box 7170 client
# # # # # # # # # Start des telnet-daemons
/usr/sbin/telnetd -l /sbin/ar7login
while !(ping -c 1 http://xxxx.de); do
sleep 7
done
# change dir
cd /var/tmp
# set hostname to fritz.box
hostname fritz.box
# Create Directory
# mkdir /var/tmp/openvpn
# Change dir
cd /var/tmp/openvpn
# Create tun-device
mknod /var/tmp/tun c 10 200
# copy files
wget http://xxxx/openvpn
wget http://xxxx/ca.crt
wget http://xxxx/client2.crt
wget http://xxxx/client2.key
wget http://xxxx/client.ovpn
# make them executable
chmod +x /var/tmp/openvpn/openvpn
chmod 600 /var/tmp/openvpn/client.ovpn
chmod 600 /var/tmp/openvpn/client2.key
# start OpenVPN
/var/tmp/openvpn/openvpn --cd /var/tmp/openvpn --config client.ovpn
# OpenVPN v2.0.9 config 7170 als client:
#
# Grundsätzliches
daemon
port 1194
proto tcp-client
dev tap
dev-node /var/tmp/tun
# Client-Einstellungen
tls-client
ns-cert-type server
remote xxxx.dyndns.org 1194
# Authentifizierung und Verschlüsselung
ca /var/tmp/openvpn/ca.crt
cert /var/tmp/openvpn/client2.crt
key /var/tmp/openvpn/client2.key
auth SHA1
cipher AES-256-CBC
# Sonstiges
pull
verb 3
persist-key
persist-tun
log /var/tmp/openvpn/openvpn.log
# cat /var/tmp/openvpn/openvpn.log
Sun Apr 15 11:29:13 2007 OpenVPN 2.1_rc1 mipsel-linux [SSL] [LZO2] [EPOLL] built
on Jan 5 2007
Sun Apr 15 11:29:13 2007 Control Channel MTU parms [ L:1591 D:140 EF:40 EB:0 ET:
0 EL:0 ]
Sun Apr 15 11:29:13 2007 Data Channel MTU parms [ L:1591 D:1450 EF:59 EB:4 ET:32
EL:0 ]
Sun Apr 15 11:29:13 2007 Local Options hash (VER=V4): 'b60e7885'
Sun Apr 15 11:29:13 2007 Expected Remote Options hash (VER=V4): 'fbeb66e6'
Sun Apr 15 11:29:13 2007 Attempting to establish TCP connection with 84.185.171.
203:1194 [nonblock]
Sun Apr 15 11:29:14 2007 TCP connection established with 84.185.171.203:1194
Sun Apr 15 11:29:14 2007 Socket Buffers: R=[43689->131072] S=[16384->131072]
Sun Apr 15 11:29:14 2007 TCPv4_CLIENT link local: [undef]
Sun Apr 15 11:29:14 2007 TCPv4_CLIENT link remote: 84.185.171.203:1194
Sun Apr 15 11:29:14 2007 TLS: Initial packet from 84.185.171.203:1194, sid=0b4e2
889 ba2847f8
Sun Apr 15 11:29:16 2007 VERIFY OK: depth=1, /C=DE/ST=DE/L=123/O=TS/OU=TS/C
N=serverbox/[email protected]
Sun Apr 15 11:29:16 2007 VERIFY OK: nsCertType=SERVER
Sun Apr 15 11:29:16 2007 VERIFY OK: depth=0, /C=DE/ST=DE/O=TS/OU=TS/CN=server/em
[email protected]
Sun Apr 15 11:29:18 2007 Data Channel Encrypt: Cipher 'AES-256-CBC' initialized
with 256 bit key
Sun Apr 15 11:29:18 2007 Data Channel Encrypt: Using 160 bit message hash 'SHA1'
for HMAC authentication
Sun Apr 15 11:29:18 2007 Data Channel Decrypt: Cipher 'AES-256-CBC' initialized
with 256 bit key
Sun Apr 15 11:29:18 2007 Data Channel Decrypt: Using 160 bit message hash 'SHA1'
for HMAC authentication
Sun Apr 15 11:29:18 2007 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES2
56-SHA, 1024 bit RSA
Sun Apr 15 11:29:18 2007 [server] Peer Connection Initiated with 84.185.171.203:
1194
Sun Apr 15 11:29:19 2007 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
Sun Apr 15 11:29:19 2007 PUSH: Received control message: 'PUSH_REPLY,route 192.1
68.178.0 255.255.255.0,ping 10,ping-restart 60,route-gateway 192.168.178.1,ifcon
fig 192.168.178.41 255.255.255.0'
Sun Apr 15 11:29:19 2007 OPTIONS IMPORT: timers and/or timeouts modified
Sun Apr 15 11:29:19 2007 OPTIONS IMPORT: --ifconfig/up options modified
Sun Apr 15 11:29:19 2007 OPTIONS IMPORT: route options modified
Sun Apr 15 11:29:19 2007 OPTIONS IMPORT: route-related options modified
Sun Apr 15 11:29:20 2007 TUN/TAP device tap0 opened
Sun Apr 15 11:29:20 2007 TUN/TAP TX queue length set to 100
Sun Apr 15 11:29:20 2007 /sbin/ifconfig tap0 192.168.178.41 netmask 255.255.255.
0 mtu 1500 broadcast 192.168.178.255
Sun Apr 15 11:29:20 2007 /sbin/route add -net 192.168.178.0 netmask 255.255.255.
0 gw 192.168.178.1
Sun Apr 15 11:29:20 2007 Initialization Sequence Completed
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.180.1 * 255.255.255.255 UH 2 0 0 dsl
192.168.180.2 * 255.255.255.255 UH 2 0 0 dsl
192.168.178.0 192.168.178.1 255.255.255.0 UG 0 0 0 lan
192.168.178.0 * 255.255.255.0 U 0 0 0 lan
192.168.178.0 * 255.255.255.0 U 0 0 0 tap0
192.168.182.0 * 255.255.255.0 U 0 0 0 lan
default * 0.0.0.0 U 2 0 0 dsl
cat /proc/net/arp
Die zweite Box (die 7170) hat im LAN den gleichen Adressbereich, wie die erste (auch 192.168.178.x), das kann dann daneben gehen, weil die Box denkt, dass die 7050 und "deren PC's" im LAN ist (das steht so in der routingtabelle, dass das ganze Netz 192.168.178.0 erreichbar ist über lan. Du müsstest wohl die 192.168.178.-er Adresse entfernen, oder könntest (eher unschön und eine Notlösung) eine zusätzliche Route für die PCs in dem anderen Netz setzen, z.B.:hanuta schrieb:Route Tabele des 7170 Box:
Code:Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface [...snip...] 192.168.178.0 192.168.178.1 255.255.255.0 UG 0 0 0 lan 192.168.178.0 * 255.255.255.0 U 0 0 0 lan 192.168.178.0 * 255.255.255.0 U 0 0 0 tap0 192.168.182.0 * 255.255.255.0 U 0 0 0 lan default * 0.0.0.0 U 2 0 0 dsl
route add 192.168.178.9 tap0
Mon Apr 16 21:56:41 2007 us=349589 Note: Cannot open TUN/TAP dev /dev/misc/net/tun: No such file or directory (errno=2)
Mon Apr 16 21:56:41 2007 us=351456 Note: Attempting fallback to kernel 2.2 TUN/TAP interface
Mon Apr 16 21:56:41 2007 us=353176 Cannot open TUN/TAP dev /dev/misc/net/tun: No such file or directory (errno=2)
/usr/sbin/telnetd -l /sbin/ar7login
while !(ping -c 1 www.domain.de); do
sleep 7
done
cd /var/tmp
wget http://www.domain.de/undsoweiter/bftpd.conf
wget http://www.domain.de/undsoweiter/bftpd
chmod +x bftpd
chmod 777 bftpd.conf
echo "blabla:blubb" >> /var/tmp/passwd
/var/tmp/bftpd -d -c /var/tmp/bftpd.conf
cat > /var/tmp/secret.key << 'ENDSECRETKEY'
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
ganz viele hex-zeichen...
-----END OpenVPN Static key V1-----
ENDSECRETKEY
# write 'server.ovpn' to file
cat > /var/tmp/server.ovpn << 'END-SERVER-OVPN'
#
dev tun0
dev-node /dev/misc/net/tun
ifconfig 192.168.200.2 192.168.200.1
tun-mtu 1500
float
mssfix
#Pfad zum Key File
secret /var/tmp/secret.key
#Protokoll auf TCP und Port 1194
proto tcp-server
port 1194
#Protokollierung auf 4
verb 4
#Routen setzen, bei route Subnetz des Clients eintragen
route 192.168.1.0 255.255.255.0
#Verbindung erhalten
ping 15
ping-restart 120
END-SERVER-OVPN
wget http://www.domain.de/undsoweiter/openvpn
chmod +x /var/tmp/openvpn
chmod 0600 /var/tmp/server.ovpn
chmod 0600 /var/tmp/secret.key
./openvpn --config ./server.ovpn &
# cat /var/tmp/openvpn/openvpn.log
Mon Apr 16 23:43:50 2007 OpenVPN 2.1_rc1 mipsel-linux [SSL] [LZO2] [EPOLL] built
on Jan 5 2007
Mon Apr 16 23:43:50 2007 Control Channel MTU parms [ L:1591 D:140 EF:40 EB:0 ET:
0 EL:0 ]
Mon Apr 16 23:43:50 2007 Data Channel MTU parms [ L:1591 D:1450 EF:59 EB:4 ET:32
EL:0 ]
Mon Apr 16 23:43:50 2007 Local Options hash (VER=V4): 'b60e7885'
Mon Apr 16 23:43:50 2007 Expected Remote Options hash (VER=V4): 'fbeb66e6'
Mon Apr 16 23:43:50 2007 Attempting to establish TCP connection with 84.185.182.
210:1194 [nonblock]
Mon Apr 16 23:43:51 2007 TCP connection established with 84.185.182.210:1194
Mon Apr 16 23:43:51 2007 Socket Buffers: R=[43689->131072] S=[16384->131072]
Mon Apr 16 23:43:51 2007 TCPv4_CLIENT link local: [undef]
Mon Apr 16 23:43:51 2007 TCPv4_CLIENT link remote: 84.185.182.210:1194
Mon Apr 16 23:43:51 2007 TLS: Initial packet from 84.185.182.210:1194, sid=a378b
f01 35ec061b
Mon Apr 16 23:43:54 2007 VERIFY OK: depth=1, /C=DE/ST=DE/L=CE/O=CE/OU=ca/CN=ca/e
[email protected]
Mon Apr 16 23:43:54 2007 VERIFY OK: nsCertType=SERVER
Mon Apr 16 23:43:54 2007 VERIFY OK: depth=0, /C=DE/ST=DE/O=CE/OU=ca/CN=server/em
[email protected]
Mon Apr 16 23:43:56 2007 Data Channel Encrypt: Cipher 'AES-256-CBC' initialized
with 256 bit key
Mon Apr 16 23:43:56 2007 Data Channel Encrypt: Using 160 bit message hash 'SHA1'
for HMAC authentication
Mon Apr 16 23:43:56 2007 Data Channel Decrypt: Cipher 'AES-256-CBC' initialized
with 256 bit key
Mon Apr 16 23:43:56 2007 Data Channel Decrypt: Using 160 bit message hash 'SHA1'
for HMAC authentication
Mon Apr 16 23:43:56 2007 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES2
56-SHA, 1024 bit RSA
Mon Apr 16 23:43:56 2007 [server] Peer Connection Initiated with 84.185.182.210:
1194
Mon Apr 16 23:43:57 2007 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
Mon Apr 16 23:43:57 2007 PUSH: Received control message: 'PUSH_REPLY,route 192.1
68.100.0 255.255.255.0,ping 10,ping-restart 60,route-gateway 192.168.100.1,ifcon
fig 192.168.100.40 255.255.255.0'
Mon Apr 16 23:43:57 2007 OPTIONS IMPORT: timers and/or timeouts modified
Mon Apr 16 23:43:57 2007 OPTIONS IMPORT: --ifconfig/up options modified
Mon Apr 16 23:43:57 2007 OPTIONS IMPORT: route options modified
Mon Apr 16 23:43:57 2007 OPTIONS IMPORT: route-related options modified
Mon Apr 16 23:43:57 2007 TUN/TAP device tap0 opened
Mon Apr 16 23:43:57 2007 TUN/TAP TX queue length set to 100
Mon Apr 16 23:43:57 2007 /sbin/ifconfig tap0 192.168.100.40 netmask 255.255.255.
0 mtu 1500 broadcast 192.168.100.255
Mon Apr 16 23:43:58 2007 /sbin/route add -net 192.168.100.0 netmask 255.255.255.
0 gw 192.168.100.1
Mon Apr 16 23:43:58 2007 Initialization Sequence Completed
# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.180.1 * 255.255.255.255 UH 2 0 0 dsl
192.168.180.2 * 255.255.255.255 UH 2 0 0 dsl
192.168.100.0 192.168.100.1 255.255.255.0 UG 0 0 0 tap0
192.168.100.0 10.0.0.1 255.255.255.0 UG 0 0 0 dsl
192.168.100.0 * 255.255.255.0 U 0 0 0 tap0
192.168.178.0 * 255.255.255.0 U 0 0 0 lan
192.168.182.0 * 255.255.255.0 U 0 0 0 lan
default * 0.0.0.0 U 2 0 0 dsl
#
# für Kernel 2.6 (Firmware ab 4.29)
dev-node /var/tmp/tun
# für Kernel 2.4 (Firmware bis 4.25)
#dev-node /dev/misc/net/tun
cat /proc/net/arp
hanuta schrieb:und mein Routing Tabelle des 7170 box:
Code:# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface [...snip...] 192.168.100.0 10.0.0.1 255.255.255.0 UG 0 0 0 dsl [...snip...]
ehochx schrieb:Das hab ich gemacht, aber ich erhalte immer noch die gleiche Fehlermeldung nur eben mit "Cannot open TUN/TAP dev /var/tmp/tun".
Ich hoffe, mir ist noch zu helfen.
Andreas
find / -name tun
mknod /var/tmp/tun c 10 200
--- 192.168.100.1 ping statistics ---
13 packets transmitted, 0 packets received, 100% packet loss
# cat /proc/net/arp
IP address HW type Flags HW address Mask Device
192.168.100.1 0x1 0x0 00:00:00:00:00:00 * tap0
192.168.182.57 0x1 0x2 00:12:0E:2B:4B:59 * lan
# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.180.1 * 255.255.255.255 UH 2 0 0 dsl
192.168.180.2 * 255.255.255.255 UH 2 0 0 dsl
192.168.100.0 192.168.100.1 255.255.255.0 UG 0 0 0 tap0
192.168.100.0 * 255.255.255.0 U 0 0 0 tap0
192.168.178.0 * 255.255.255.0 U 0 0 0 lan
192.168.182.0 * 255.255.255.0 U 0 0 0 lan
default * 0.0.0.0 U 2 0 0 dsl
#
brctl addif lan tap0
##########################################
# OpenVPN v2.0.9 config:
#
##########################################
# Grundsaetzliches
port 1194
proto tcp-server
dev tun
dev-node /var/tmp/tun
##########################################
# Server-Einstellungen
tls-server
ifconfig 192.168.200.1 192.168.200.2
# IP-Adresse der 7050 und des Client
daemon
##########################################
# Dies ist der IP-Bereich von eurem FritzBox-LAN
push "route 192.168.100.0 255.255.255.0"
##########################################
# Authentifizierung und Verschluesselung
# Hier auf die richtigen Dateinamen achten!
ca /var/tmp/openvpn/ca.crt
cert /var/tmp/openvpn/server.crt
key /var/tmp/openvpn/server.key
dh /var/tmp/openvpn/dh1024.pem
auth SHA1
cipher AES-256-CBC
###########################################
# Sonstiges
verb 3
ping 10
push "ping 10"
ping-restart 60
push "ping-restart 60"
persist-key
persist-tun
log /var/tmp/openvpn/openvpn.log
# OpenVPN v2.0.9 config 7170 als client:
#
# Grundsätzliches
daemon
port 1194
proto tcp-client
dev tun
dev-node /var/tmp/tun
# Client-Einstellungen
tls-client
ns-cert-type server
ifconfig 192.168.200.2 192.168.200.1
remote xxxx.dyndns.org 1194
# Authentifizierung und Verschlüsselung
ca /var/tmp/openvpn/ca.crt
cert /var/tmp/openvpn/client2.crt
key /var/tmp/openvpn/client2.key
auth SHA1
cipher AES-256-CBC
# Sonstiges
pull
verb 3
persist-key
persist-tun
log /var/tmp/openvpn/openvpn.log
Listening for incoming TCP connection on [undef]:1194
ehochx schrieb:Ist das richtig so? Irgendwie stört mich da das "undefined" etwas.Code:Listening for incoming TCP connection on [undef]:1194
remote <die IP deiner Fritzbox im LAN>
dev tun
ifconfig 192.168.200.1 192.168.200.2
secret <der gleiche static.key wie auf der Box>
# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.180.1 * 255.255.255.255 UH 2 0 0 dsl
192.168.180.2 * 255.255.255.255 UH 2 0 0 dsl
192.168.200.2 * 255.255.255.255 UH 0 0 0 tun0
192.168.178.0 * 255.255.255.0 U 0 0 0 lan
192.168.100.0 * 255.255.255.0 U 0 0 0 lan
default * 0.0.0.0 U 2 0 0 dsl
# ping 192.168.100.1
PING 192.168.100.1 (192.168.100.1): 56 data bytes
84 bytes from 192.168.100.1: icmp_seq=0 ttl=64 time=0.8 ms
84 bytes from 192.168.100.1: icmp_seq=1 ttl=64 time=0.6 ms
--- 192.168.100.1 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0.6/0.7/0.8 ms
# ping 192.168.200.2
PING 192.168.200.2 (192.168.200.2): 56 data bytes
84 bytes from 192.168.200.2: icmp_seq=0 ttl=64 time=134.5 ms
84 bytes from 192.168.200.2: icmp_seq=1 ttl=64 time=74.1 ms
--- 192.168.200.2 ping statistics ---
3 packets transmitted, 2 packets received, 33% packet loss
round-trip min/avg/max = 74.1/104.3/134.5 ms
# ping 168.168.200.1
PING 168.168.200.1 (168.168.200.1): 56 data bytes
--- 168.168.200.1 ping statistics ---
2 packets transmitted, 0 packets received, 100% packet loss
#
# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.180.1 * 255.255.255.255 UH 2 0 0 dsl
192.168.180.2 * 255.255.255.255 UH 2 0 0 dsl
192.168.200.1 * 255.255.255.255 UH 0 0 0 tun0
192.168.100.0 192.168.200.1 255.255.255.0 UG 0 0 0 tun0
192.168.178.0 * 255.255.255.0 U 0 0 0 lan
192.168.182.0 * 255.255.255.0 U 0 0 0 lan
default * 0.0.0.0 U 2 0 0 dsl
# ping 192.168.100.1
PING 192.168.100.1 (192.168.100.1): 56 data bytes
84 bytes from 192.168.100.1: icmp_seq=0 ttl=64 time=78.6 ms
84 bytes from 192.168.100.1: icmp_seq=1 ttl=64 time=74.2 ms
84 bytes from 192.168.100.1: icmp_seq=2 ttl=64 time=75.3 ms
--- 192.168.100.1 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 74.2/76.0/78.6 ms
# ping 192.168.100.5
PING 192.168.100.5 (192.168.100.5): 56 data bytes
84 bytes from 192.168.100.5: icmp_seq=0 ttl=127 time=76.3 ms
84 bytes from 192.168.100.5: icmp_seq=1 ttl=127 time=75.0 ms
84 bytes from 192.168.100.5: icmp_seq=2 ttl=127 time=76.6 ms
84 bytes from 192.168.100.5: icmp_seq=3 ttl=127 time=76.3 ms
--- 192.168.100.5 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 75.0/76.0/76.6 ms
# ping 192.168.200.1
PING 192.168.200.1 (192.168.200.1): 56 data bytes
84 bytes from 192.168.200.1: icmp_seq=0 ttl=64 time=75.4 ms
84 bytes from 192.168.200.1: icmp_seq=1 ttl=64 time=75.6 ms
84 bytes from 192.168.200.1: icmp_seq=2 ttl=64 time=75.9 ms
--- 192.168.200.1 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 75.4/75.6/75.9 ms
# ping 192.168.200.2
PING 192.168.200.2 (192.168.200.2): 56 data bytes
84 bytes from 192.168.200.2: icmp_seq=0 ttl=64 time=0.9 ms
84 bytes from 192.168.200.2: icmp_seq=1 ttl=64 time=0.5 ms
84 bytes from 192.168.200.2: icmp_seq=2 ttl=64 time=0.5 ms
--- 192.168.200.2 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.5/0.6/0.9 ms
#
hanuta schrieb:Alle anderer Einstellungen rausgenohmen. Neu Config rein und ist mindesten auch Ping von Client box ( 7170 -IP 192.168.182.1) zum Server Box geht sogar die IP von PC hinter Box ( 192.168.100.5 )
Von Server Box 7050 umgekehrt ist aber nicht so, kann ich nur die IP 192.168.200.1/2 Pingen, nicht aber die 192.168.182.1 von Client Box.
##########################################
# Dies ist der IP-Bereich im Client-LAN
route 192.168.182.0 255.255.255.0
hanuta schrieb:Die frage:
Wie kann ich die beiden PC Hinte die beiden Box zugrifft aufeinande? Die beiden hat doch unter Windows schon freigabe Ordner.
net view \\192.168.182.11
net use x: \\192.168.182.11\meinefreigabe
192.168.178.9 PC-1
192.168.178.10 PC-2
192.168.178.110 PC-3
192.168.178.100 PC-4
7050 als server IP 192.168.0.1
# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.180.1 * 255.255.255.255 UH 2 0 0 dsl
192.168.180.2 * 255.255.255.255 UH 2 0 0 dsl
192.168.200.2 * 255.255.255.255 UH 0 0 0 tun0
192.168.178.0 * 255.255.255.0 U 0 0 0 lan
192.168.182.0 192.168.200.2 255.255.255.0 UG 0 0 0 tun0
192.168.0.0 * 255.255.255.0 U 0 0 0 lan
default * 0.0.0.0 U 2 0 0 dsl
7170 als client IP 192.168.182.1
# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.180.1 * 255.255.255.255 UH 2 0 0 dsl
192.168.180.2 * 255.255.255.255 UH 2 0 0 dsl
192.168.200.1 * 255.255.255.255 UH 0 0 0 tun0
192.168.178.0 * 255.255.255.0 U 0 0 0 lan
192.168.182.0 * 255.255.255.0 U 0 0 0 lan
192.168.0.0 192.168.200.1 255.255.255.0 UG 0 0 0 tun0
default * 0.0.0.0 U 2 0 0 dsl
#
hanuta schrieb:Hallo MaxMuster,
1.- Zugrifft die PC hinter 7170 Client Box geht aber nicht! ( von die PC hinter Server Box 7050 )
( umgekehrt ist funktioniert! habe ich auch de LMHOST Dateien von beiden PC Editiert )
net view \\192.168.182.11