Open VPN routing hiba HELP! [MEGOLDVA]

Sziasztok!

MÉG MINDIG NEM TALÁLOM A BAJ OKÁT!!!
Néhány gépet meg tudok pingelni a belső hálón, néhányat nem. Ami működik, egy másik linuxos szerver és egy hálózati nyomtató. Ami nem működik: az openvpn szerveren lévő VirtualBox virtuális gépek (ez volna az igazán fontos), windowsos kliensek és egy TP-LINK wlan router.

Tud valaki segíteni? Már nagyon a körmömre égett a dolog!

Az eredeti bejegyzés:

A következő bajom van. Adott egy kis irodai hálózat. Külső internet kábelmodemmel, router gép egy Debian két hálókártyával (külső eth0, belső eth1). A VPN kapcsolódás megy, de a kliens csak a szervert látja. (Máshol ez már megy nekem, itt tanácstalan vagyok. Eddig Ubuntu szerverrel csináltam ilyet, és megy. Ez a Debian eredetileg egy hálókártyával volt installálva, a másodikat utólag tettük bele - ez remélem nem lehet gond.)

Aki tud valami segítséget, megköszönöm.

Konfigurációs és napló fájlok (ha bármi egyéb kell, küldöm):
Linux verzió:
Linux gray 2.6.32-5-amd64 #1 SMP Tue Jun 14 09:42:28 UTC 2011 x86_64

Szerver ifconfig:

eth0 Link encap:Ethernet HWaddr ff:ae:c5:b6:63:2c
inet addr:YYY.YYY.YYY.YYY Bcast:255.255.255.255 Mask:255.255.252.0
inet6 addr: fe80::beae:c5ff:feb6:632c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2718390 errors:0 dropped:0 overruns:0 frame:0
TX packets:945367 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1387844852 (1.2 GiB) TX bytes:164680440 (157.0 MiB)
Interrupt:28 Base address:0x2000

eth1 Link encap:Ethernet HWaddr 90:f6:52:18:ec:4b
inet addr:10.9.10.41 Bcast:10.9.10.255 Mask:255.255.255.0
inet6 addr: fe80::92f6:52ff:fe18:ec4b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1355991 errors:0 dropped:0 overruns:0 frame:0
TX packets:1646024 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:228508873 (217.9 MiB) TX bytes:1863251330 (1.7 GiB)
Interrupt:27 Base address:0x8000

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:851 errors:0 dropped:0 overruns:0 frame:0
TX packets:851 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:59882 (58.4 KiB) TX bytes:59882 (58.4 KiB)

tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.9.9.1 P-t-P:10.9.9.2 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:142 errors:0 dropped:0 overruns:0 frame:0
TX packets:94 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:12848 (12.5 KiB) TX bytes:15412 (15.0 KiB)

Szerver route -n:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface

10.9.9.2 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
10.9.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
10.9.9.0 10.9.9.2 255.255.255.0 UG 0 0 0 tun0
XX.XX.XX.XX 0.0.0.0 255.255.252.0 U 0 0 0 eth0
0.0.0.0 ZZ.ZZ.ZZ.ZZZ 0.0.0.0 UG 0 0 0 eth0

Szerver VPN konfig:
port 1194
proto tcp
dev tun
ca /etc/openvpn/ca.crt
cert /etc/openvpn/server.crt
key /etc/openvpn/server.key
crl-verify /etc/openvpn/crl.pem
dh /etc/openvpn/dh1024.pem
server 10.9.9.0 255.255.255.
push "route 10.9.10.0 255.255.255.0" # local route
duplicate-cn
keepalive 10 120
comp-lzo
;client-to-client # clients see each other
persist-key
persist-tun
status /var/log/openvpn/openvpn-status.log
verb 3mute 20

Kliens VPN konfig:
dev tun

remote dev.xxxxxx.com 1194

proto tcp
nobind
resolv-retry infinite
persist-key
persist-tun

client

ca ca.crt

cert nagyp.crt

key nagyp.key

cipher BF-CBC

keysize 128

comp-lzo

verb 3

Kliens napló:
Thu Aug 02 10:41:40 2012 OpenVPN 2.2.2 Win32-MSVC++ [SSL] [LZO2] [PKCS11] built on Dec 15 2011
Thu Aug 02 10:41:40 2012 WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info.
Thu Aug 02 10:41:40 2012 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Thu Aug 02 10:41:41 2012 LZO compression initialized
Thu Aug 02 10:41:41 2012 Control Channel MTU parms [ L:1544 D:140 EF:40 EB:0 ET:0 EL:0 ]
Thu Aug 02 10:41:41 2012 Socket Buffers: R=[262144->262144] S=[49152->49152]
Thu Aug 02 10:41:41 2012 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:0 EL:0 AF:3/1 ]
Thu Aug 02 10:41:41 2012 Local Options hash (VER=V4): '69109d17'
Thu Aug 02 10:41:41 2012 Expected Remote Options hash (VER=V4): 'c0103fa8'
Thu Aug 02 10:41:41 2012 Attempting to establish TCP connection with YYY.YYY.YYY.YYY:1194
Thu Aug 02 10:41:41 2012 TCP connection established with YYY.YYY.YYY.YYY:1194
Thu Aug 02 10:41:41 2012 TCPv4_CLIENT link local: [undef]
Thu Aug 02 10:41:41 2012 TCPv4_CLIENT link remote: YYY.YYY.YYY.YYY:1194
Thu Aug 02 10:41:41 2012 TLS: Initial packet from YYY.YYY.YYY.YYY:1194, sid=89ed2707 3d39a5f2
Thu Aug 02 10:41:42 2012 VERIFY OK: depth=1, /C=HU/ST=HU/L=Budapest/O=xxxxxxxx_Kft_VPN/OU=DEV/CN=xxxxxxxx_Kft_VPN_CA/name=xxxxxxxx/emailAddress=xxxxxxxx@xxxxxxxx.com
Thu Aug 02 10:41:42 2012 VERIFY OK: depth=0, /C=HU/ST=HU/L=Budapest/O=xxxxxxxx_Kft_VPN/OU=VPN/CN=server/emailAddress=xxxxxxxx@xxxxxxxx.com
Thu Aug 02 10:41:45 2012 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Thu Aug 02 10:41:45 2012 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Thu Aug 02 10:41:45 2012 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Thu Aug 02 10:41:45 2012 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Thu Aug 02 10:41:45 2012 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 1024 bit RSA
Thu Aug 02 10:41:45 2012 [server] Peer Connection Initiated with YYY.YYY.YYY.YYY:1194
Thu Aug 02 10:41:47 2012 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
Thu Aug 02 10:41:47 2012 PUSH: Received control message: 'PUSH_REPLY,route 10.9.10.0 255.255.255.0,route 10.9.9.1,topology net30,ping 10,ping-restart 120,ifconfig 10.9.9.6 10.9.9.5'
Thu Aug 02 10:41:47 2012 OPTIONS IMPORT: timers and/or timeouts modified
Thu Aug 02 10:41:47 2012 OPTIONS IMPORT: --ifconfig/up options modified
Thu Aug 02 10:41:47 2012 OPTIONS IMPORT: route options modified
Thu Aug 02 10:41:47 2012 ROUTE default_gateway=151.0.78.181
Thu Aug 02 10:41:47 2012 TAP-WIN32 device [Helyi kapcsolat 2] opened: \\.\Global\{B1A1DD9A-68E0-4AFE-8FEF-F78C2B8733FA}.tap
Thu Aug 02 10:41:47 2012 TAP-Win32 Driver Version 9.9
Thu Aug 02 10:41:47 2012 TAP-Win32 MTU=1500
Thu Aug 02 10:41:47 2012 Notified TAP-Win32 driver to set a DHCP IP/netmask of 10.9.9.6/255.255.255.252 on interface {B1A1DD9A-68E0-4AFE-8FEF-F78C2B8733FA} [DHCP-serv: 10.9.9.5, lease-time: 31536000]
Thu Aug 02 10:41:47 2012 Successful ARP Flush on interface [4] {B1A1DD9A-68E0-4AFE-8FEF-F78C2B8733FA}
Thu Aug 02 10:41:53 2012 TEST ROUTES: 2/2 succeeded len=2 ret=1 a=0 u/d=up
Thu Aug 02 10:41:53 2012 C:\WINDOWS\system32\route.exe ADD 10.9.10.0 MASK 255.255.255.0 10.9.9.5
Thu Aug 02 10:41:53 2012 Route addition via IPAPI succeeded [adaptive]
Thu Aug 02 10:41:53 2012 C:\WINDOWS\system32\route.exe ADD 10.9.9.1 MASK 255.255.255.255 10.9.9.5
Thu Aug 02 10:41:53 2012 Route addition via IPAPI succeeded [adaptive]
Thu Aug 02 10:41:53 2012 Initialization Sequence Completed

Hozzászólások

eznemkell > push "route 10.9.10.0 255.255.255.0" # local route

--
"'The time has come,' the Walrus said"

push cucc maradjon, log szerint jol fel is rakja a route-ot a kliensen.

igy debugolhatsz: kovess vegig egy ping-et: pingelsz egy belso gepet, "tcpdump -i tun1 icmp" a serveren, ha latod a csomagokat, akkor eddig jo. "tcpdump -i eth1 icmp" ha latod hogy kimegy a cel gepnek, akkor jo, ha latod a vissza valaszt akkor megjobb. stb.

--
A vegtelen ciklus is vegeter egyszer, csak kelloen eros hardver kell hozza!

Kösz az ötletet, itt látok valami furcsát:
tun1:
12:20:11.699735 IP 10.9.9.6 > gray: ICMP echo request, id 1024, seq 4608, length 40
12:20:11.699803 IP gray > 10.9.9.6: ICMP echo reply, id 1024, seq 4608, length 40
12:20:12.699483 IP 10.9.9.6 > gray: ICMP echo request, id 1024, seq 4864, length 40
12:20:12.699531 IP gray > 10.9.9.6: ICMP echo reply, id 1024, seq 4864, length 40
12:20:13.699413 IP 10.9.9.6 > gray: ICMP echo request, id 1024, seq 5120, length 40
12:20:13.699448 IP gray > 10.9.9.6: ICMP echo reply, id 1024, seq 5120, length 40
12:20:14.699412 IP 10.9.9.6 > gray: ICMP echo request, id 1024, seq 5376, length 40
12:20:14.699445 IP gray > 10.9.9.6: ICMP echo reply, id 1024, seq 5376, length 40
12:20:18.860470 IP 10.9.9.6 > dev: ICMP echo request, id 1024, seq 5632, length 40
12:20:24.016105 IP 10.9.9.6 > dev: ICMP echo request, id 1024, seq 5888, length 40
12:20:29.001277 IP 10.9.9.6 > dev: ICMP echo request, id 1024, seq 6144, length 40
12:20:34.511042 IP 10.9.9.6 > dev: ICMP echo request, id 1024, seq 6400, length 40
eth1:
12:25:50.803311 IP 10.9.9.6 > dev: ICMP echo request, id 1024, seq 8704, length 40
12:25:50.803702 IP dev > 10.9.9.6: ICMP echo reply, id 1024, seq 8704, length 40
12:25:55.923621 IP 10.9.9.6 > dev: ICMP echo request, id 1024, seq 8960, length 40
12:25:55.923877 IP dev > 10.9.9.6: ICMP echo reply, id 1024, seq 8960, length 40
12:26:00.944129 IP 10.9.9.6 > dev: ICMP echo request, id 1024, seq 9216, length 40
12:26:00.944451 IP dev > 10.9.9.6: ICMP echo reply, id 1024, seq 9216, length 40
12:26:05.954600 IP 10.9.9.6 > dev: ICMP echo request, id 1024, seq 9472, length 40
12:26:05.954927 IP dev > 10.9.9.6: ICMP echo reply, id 1024, seq 9472, length 40

Az első esetben a VPN szervert pingeltem (gray) 4x, utána egy másik gépet (dev) a belső hálón. eth1-ről nem jött vissza tun1-re.

Hogy miért, nem tudom.

Ide teszem még a tűzfal szkriptet:
#!/bin/sh

# $Id: firewall.ini 120 2006-09-21 22:17:36Z root $

# If you want the box to just act as a router, uncomment the 2 lines below
#echo 1 > /proc/sys/net/ipv4/ip_forward
#exit 0

#
# Firewall setup.
#
OUTSIDE_DEVICE=eth0
INSIDE_DEVICE=eth1
INSIDE_NETWORK=10.9.10.0
INSIDE_NETMASK=255.255.255.0
SVN_SERVER_IP=10.9.10.50
#VPN_SERVER_IP=10.9.10.30

#
# Do you want to do port forwaring to an internal server?
# Set the server IP here and sort out the port stuff later in this file.
#
##SERVER_IP=10.42.42.42

#
# Stopping forwarding (this script may be run during normal uptime because
# for re-lease of HDCP or demand dialing / PPPoE.
#
echo "0" > /proc/sys/net/ipv4/ip_forward

#
# Brad suggested this:
# And he suggested to check and maybe change the formatting.
# We'll do that later.
#
#echo "Starting firewall with the following config:"
#printf "\t\t Inside\t\tOutside
# Physical device: %-15s\t%-15s
# Logical device: %-15s\t%-15s
#\t Network: %-15s\t%-15s
# IP Address: %-15s\t%-15s
#\t Netmask: %-15s\t%-15s
# Broadcast: %-15s\t%-15s
#\t Gateway: %-15s\t%-15s\n" $INSIDE_DEV $OUTSIDE_DEV \
# $INSIDE_DEVICE $OUTSIDE_DEVICE \
# $INSIDE_NETWORK $OUTSIDE_NETWORK \
# $INSIDE_IP $OUTSIDE_IP \
# $INSIDE_NETMASK $OUTSIDE_NETMASK \
# $INSIDE_BROADCAST $OUTSIDE_BROADCAST \
# "[None Set]" $OUTSIDE_GATEWAY
#
#
# Flushing the chains.
#

iptables -F
iptables -X
iptables -Z
for i in `cat /proc/net/ip_tables_names`
do
iptables -F -t $i
iptables -X -t $i
iptables -Z -t $i
done

#
# Policy for chains DROP everything
#

iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP

#
# SYN-Flooding protection
# Looks good and nicked from a firewall script mentioned on floppyfw.something.
# Didn't work that well..
#
iptables -N syn-flood
iptables -A INPUT -i ${OUTSIDE_DEVICE} -p tcp --syn -j syn-flood
iptables -A syn-flood -m limit --limit 1/s --limit-burst 4 -j RETURN
iptables -A syn-flood -j DROP
# Make sure NEW tcp connections are SYN packets
iptables -A INPUT -i ${OUTSIDE_DEVICE} -p tcp ! --syn -m state --state NEW -j DROP

#
# Good old masquerading.
#
iptables -t nat -A POSTROUTING -s ${INSIDE_NETWORK}/${INSIDE_NETMASK} -o ${OUTSIDE_DEVICE} -j MASQUERADE

#
# Forwarding outside ports to an internal server.
# This used to be the ipchains / ipmasqadm portfw commad.
#
# SVN:

iptables -A PREROUTING -t nat -p tcp -i ${OUTSIDE_DEVICE} --dport 3690 -j DNAT --to ${SVN_SERVER_IP}:3690
iptables -A FORWARD -p tcp -d ${SVN_SERVER_IP} --dport 3690 -o ${INSIDE_DEVICE} -j ACCEPT

## VPN:
#
#iptables -A PREROUTING -t nat -p udp -i ${OUTSIDE_DEVICE} --dport 1194 -j DNAT --to ${VPN_SERVER_IP}:1194
#iptables -A FORWARD -p udp -d ${VPN_SERVER_IP} --dport 1194 -o ${INSIDE_DEVICE} -j ACCEPT
#

# SSH:

#iptables -A PREROUTING -t nat -p tcp -d ${OUTSIDE_IP} --dport 22 -j DNAT --to ${SERVER_IP}:22
#iptables -A FORWARD -p tcp -d ${SERVER_IP} --dport 22 -o ${INSIDE_DEVICE} -j ACCEPT

# Web:
#iptables -A PREROUTING -t nat -p tcp -d ${OUTSIDE_IP} --dport 80 -j DNAT --to ${SERVER_IP}:80
#iptables -A FORWARD -p tcp -d ${SERVER_IP} --dport 80 -o ${INSIDE_DEVICE} -j ACCEPT
# This rule helps the "I can't reach my web server from the inside" problem.
#iptables -A POSTROUTING -t nat -p tcp -d ${SERVER_IP} --dport 80 -s ${INSIDE_NETWORK}/${INSIDE_NETMASK} -j SNAT --to ${OUTSIDE_IP}

# FTP:

#iptables -A PREROUTING -t nat -p tcp -d ${OUTSIDE_IP} --dport 21 -j DNAT --to ${SERVER_IP}:21
#iptables -A FORWARD -p tcp -d ${SERVER_IP} --dport 21 -o ${INSIDE_DEVICE} -j ACCEPT

# SMTP (Internal mail server):
#iptables -A PREROUTING -t nat -p tcp -d ${OUTSIDE_IP} --dport 25 -j DNAT --to ${SERVER_IP}:25
#iptables -A FORWARD -p tcp -d ${SERVER_IP} --dport 25 -o ${INSIDE_DEVICE} -j ACCEPT
# This rule helps the "I can't reach my server from the inside" problem.
#iptables -A POSTROUTING -t nat -p tcp -d ${SERVER_IP} --dport 25 -s ${INSIDE_NETWORK}/${INSIDE_NETMASK} -j SNAT --to ${OUTSIDE_IP}

##############################################################################################################################################
# Allow incoming OpenVPN packets
# Duplicate the line below for each
# OpenVPN tunnel, changing --dport n
# to match the OpenVPN UDP port.
#
# In OpenVPN, the port number is
# controlled by the --port n option.
# If you put this option in the config
# file, you can remove the leading '--'
#
# If you taking the stateful firewall
# approach (see the OpenVPN HOWTO),
# then comment out the line below.

iptables -A INPUT -p tcp --dport 1194 -j ACCEPT
iptables -A INPUT -p udp --dport 1194 -j ACCEPT

# Allow packets from TUN/TAP devices.
# When OpenVPN is run in a secure mode,
# it will authenticate packets prior
# to their arriving on a tun or tap
# interface. Therefore, it is not
# necessary to add any filters here,
# unless you want to restrict the
# type of packets which can flow over
# the tunnel.

iptables -A INPUT -i tun+ -j ACCEPT
iptables -A FORWARD -i tun+ -j ACCEPT
iptables -A INPUT -i tap+ -j ACCEPT
iptables -A FORWARD -i tap+ -j ACCEPT
###################################################################################################################################################

#
# Keep state and open up for outgoing connections.
#
iptables -A FORWARD -m state --state NEW -i ${INSIDE_DEVICE} -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -m state --state NEW,INVALID -i ${OUTSIDE_DEVICE} -j DROP

#
# This is mainly for PPPoE usage but it won't hurt anyway so we'll just
# keep it here.
#
iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu

#
# We don't like the NetBIOS and Samba leaking..
#
#iptables -t nat -A PREROUTING -p TCP --dport 135:139 -j DROP
#iptables -t nat -A PREROUTING -p UDP --dport 137:139 -j DROP
#iptables -t nat -A PREROUTING -p TCP --dport 445 -j DROP
#iptables -t nat -A PREROUTING -p UDP --dport 445 -j DROP
#

#
# We would like to ask for names from our floppyfw box
#
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT

# Ping and friends.
iptables -A OUTPUT -p icmp -j ACCEPT # to both sides.
iptables -A INPUT -p icmp -j ACCEPT

# And also, DHCP, but we can basically accept anything from the inside.
iptables -A INPUT -i ${INSIDE_DEVICE} -j ACCEPT
iptables -A OUTPUT -o ${INSIDE_DEVICE} -j ACCEPT
# And also accept talking to ourself.
iptables -A INPUT -i lo -j ACCEPT

#
# If the user wants to have the fake identd running, the identd has to
# be able to answer.
#
#if [ ${FAKEIDENT} ]
#then
# iptables -A INPUT -p TCP --dport 113 -i ${OUTSIDE_DEVICE} -j ACCEPT
#else
# iptables -A INPUT -p TCP --dport 113 -i ${OUTSIDE_DEVICE} -j REJECT --reject-with tcp-reset
#fi

#
# Forwarding SIP and VoIP rtp ports for PHONE_IP in config
#
#if [ -n "$PHONE_IP" ] && [ "$WONDER_SHAPER" = "y" ] && [ -n "$RT10" ]
#then
# if [ -n "$INTPORTS" ] && [ "$FORWARD_SIP" = "y" ]
# then
# echo "Enabling port forwarding for SIP INTPORTS setup in config"
# for a in $INTPORTS
# do
# iptables -A PREROUTING -t nat -p UDP -d ${OUTSIDE_IP} --dport $a -j DNAT --to ${PHONE_IP}:$a
# iptables -A FORWARD -p UDP -d ${PHONE_IP} --dport $a -o ${INSIDE_DEVICE} -j ACCEPT
# done
# fi
# if [ -n "$LO_RTPPORT" ] && [ -n "$HI_RTPPORT" ] && [ "$FORWARD_RTP" = "y" ]
# then
# echo "Enabling port forwarding for RTP port range setup in config"
# iptables -A PREROUTING -t nat -p UDP -d ${OUTSIDE_IP} --dport "$LO_RTPPORT":"$HI_RTPPORT" -j DNAT --to ${PHONE_IP}:"$LO_RTPPORT"-"$HI_RTPPORT"
# iptables -A FORWARD -p UDP -d ${PHONE_IP} --dport "$LO_RTPPORT":"$HI_RTPPORT" -o ${INSIDE_DEVICE} -j ACCEPT
# fi
#else
# echo "VOIP support disabled, PHONE_IP or RT10 not set or WONDER_SHAPER=n in config."
#fi

#
# Running extra scripts.
#
#for i in /etc/firewall/*
# do
# if [ -f $i ]
# then
# sh $i $1
# fi
#done

#
# This will also help:
# It does look weird but it is explained here:
# http://lartc.org/howto/lartc.qdisc.classless.html
#
# The "240Kbit" rate should be set at "a tad less than the speedn you have"
# 240Kbit is for my 256Kbit "upload"-link.
#
# tc qdisc add dev $OUTSIDE_DEVICE root tbf rate 240kbit latency 50ms burst 1540

# Or maybe you chose to use Wondershaper?
#if [ $WONDER_SHAPER = "y" ]
#then
# /sbin/wshaper.htb
#else
# #
# # And, some attempt to get interactive sesions a bit more interactive
# # under load:
# #
# iptables -A PREROUTING -t mangle -p tcp --sport ssh -j TOS --set-tos Minimize-Delay
# iptables -A PREROUTING -t mangle -p tcp --sport ftp -j TOS --set-tos Minimize-Delay
# # iptables -A PREROUTING -t mangle -p tcp --sport ftp-data -j TOS --set-tos Maximize-Throughput
#
#fi

#
# Finally, list what we have
#
#
iptables -L

# If broken DNS:
#iptables -L -n

#
# The insert stuff into the kernel (ipsysctl) - section:
#
# Some of there goes under the "Better safe than sorry" - banner.
#

#
# This enables dynamic IP address following
#
echo 7 > /proc/sys/net/ipv4/ip_dynaddr

#
# trying to stop some smurf attacks.
#
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts

#
# Don't accept source routed packets.
#
/bin/echo "0" > /proc/sys/net/ipv4/conf/all/accept_source_route

#
# Syncookies (if they are really needed any more?)
#
echo "1" > /proc/sys/net/ipv4/tcp_syncookies

#
# We don't like IP spoofing,
#
if [ -f /proc/sys/net/ipv4/conf/all/rp_filter ]
then
# These two are redundant but I'll kepp'em here for now.
# Will remind me that I can add the first one somewhere smart later.
echo "1" > /proc/sys/net/ipv4/conf/default/rp_filter
echo "1" > /proc/sys/net/ipv4/conf/all/rp_filter

# while read filter
# do
# echo "1" > $filter
# done < `find /proc/sys/net/ipv4/conf -name rp_filter -print`
else
echo "Anti spoofing is not available, the author of this floppy spoofed, mail him."
fi

#
# nor ICMP redirect,
#

if [ -f /proc/sys/net/ipv4/conf/all/accept_redirects ]
then
echo "0" > /proc/sys/net/ipv4/conf/default/accept_redirects
echo "0" > /proc/sys/net/ipv4/conf/all/accept_redirects

# while read accr
# do
# echo -n "fil"
# echo $accr
# echo "fil2"
# echo "0" > $accr
# done < `find /proc/sys/net/ipv4/conf -name accept_redirects -print`

else
echo "Anti spoofing is not available, the author of this floppy spoofed, mail him."
fi

#stop arp request from other interfaces
for i in /proc/sys/net/ipv4/conf/*
do
echo 1 > $i/arp_filter
done

#
# Enable bad error message protection.
#
/bin/echo "1" > /proc/sys/net/ipv4/icmp_ignore_bogus_error_responses

# Maximum limit of ip_conntrack
# This is RAM dependant so be careful with this.
# The max, which is the valuehere, needs around 32M RAM to work properly.
# echo "65535" > /proc/sys/net/ipv4/ip_conntrack_max

# This is commented out and will be an option when we have a "LOG_STUFF"
# config option.
# /bin/echo "1" > /proc/sys/net/ipv4/conf/all/log_martians

# Ming-Ching Tiew
# Made this one for me.

# The amount to reserve is an option in config.
#reserve=`expr $RESERVE_MB \* 1048576`
##bytes per conntrack, should be kernel specific
#per_con=328
#curmax=` cat /proc/sys/net/ipv4/netfilter/ip_conntrack_max `
#set -- ` cat /proc/meminfo`
#incre=` expr \( $10 - $reserve \) / $per_con`
#new_max=` expr $curmax + $incre`
#[ $new_max -ge 65535 ] && new_max=65535
#echo "Setting ip_conntrack_max to $new_max"
#echo $new_max > /proc/sys/net/ipv4/netfilter/ip_conntrack_max

#
# Rules set, we can enable forwarding in the kernel.
#
echo "Enabling IP forwarding."

echo "1" > /proc/sys/net/ipv4/ip_forward

A belso halozaton levo gepeid, amiket el akarsz erni a VPN-en logo kliensrol, tudjak az utat a VPN halozataba? Vagyis elerik a VPN-ben hasznalt IP tartomanyt?

Belső gépről (pl backup 10.9.10.30) meg tudom pingelni a 10.9.9.6 címen bekonnektált VPN klienst. (A vpn szerver 10.9.10.41)

!!!!!!!
A VPN kliensről is meg tudom pingelni a 10.9.10.30-at, és még egy másikat is (10.9.30.174)!!!
Néhányat pedig nem (pl. 10.9.10.1, 10.9.10.50, 10.9.10.165)

Nem értem!
!!!!!

Amit nem tudsz megpingelni, ott a VPN szerveren figyelve tcpdumppal:
- El sem megy a belső hálózatig a ping (és ekkor a "külső" kliensen vagya VPN szerveren van routing probléma)
- Vagy nem jön válasz a ping-re (és ekkor tűzfallal le van tiltva, vagy nincs felvéve a VPN-es subnethez a gateway a belső háló egyes gépein)
?

szerver configbol hianyzik a opcio megadas ha jol latom, anelkul a kliensek nem latjak egymast.

client-to-client

nekem kicsit kavart a dolog.
a vpn szerver halozatan van ket virtualis gep amit szeretnel latni vpn-en keresztul?
a vpn-server cime mondjuk vpn cime 10.10.10.1 mig a valos 192.168.3.1
a virtualis gepek valos cimei 192.168.3.2 es 3.3 (peldakent)

a vpn client vpn cime 10.10.10.6,10,14,18,22,26,30 stb (ezeket tudni kell pingelni mind a szerverrol mind kliensnek a klienst)

a virtualis gepet is vpn be akarod tenni, vagy csak vpn alol a valos cimet megpingelni?

az itteni pelda szerinti 192.168.3. -as halozaton egy nem virtualis geprol (ami nem a szerver) meg tudod pingelni a virtualis gepeket?