<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Tak bohuzel, ani s timto navodem jsem neuspel. Mam tam nekde nakou
    botu :-) Jako klienta pouzivam Network manager applet pro cinnamon,
    ale kdyz se po pripojeni dostanu na server pres ssh, tak
    predpokladam, ze v klientovi chyba nebude. Kazdopadne diky za snahu.<br>
    <br>
    <div class="moz-cite-prefix">Dne 7.1.2017 v 00:32 Matouš Michalík
      napsal(a):<br>
    </div>
    <blockquote
cite="mid:CACyRmB3T9j2wXUekmf-CyjwmTZxBDGn_wpe1UsfuXRqnqwjbWw@mail.gmail.com"
      type="cite">
      <div dir="ltr">Zdravím ovpn jsem nastavoval zrovna teď v týdnu, a
        po drobných úpravách jsem uspěl s configurací níže, dle návodu
        na debian wiki <span style="outline:transparent solid 1px"><a
            moz-do-not-send="true"
            href="https://wiki.debian.org/OpenVPN"><a class="moz-txt-link-freetext" href="https://wiki.debian.org/OpenVPN">https://wiki.debian.org/OpenVPN</a></a></span>
        <div><br>
        </div>
        <div>proti návodům co jsem našel na internetu jsem měnil
          interface v iptables, na me instalaci neni eth0 ale venet0 a
          openvpn server jsem pouštěl přes:<br>
          <br>
          # systemctl start <a class="moz-txt-link-abbreviated" href="mailto:openvpn@openvpn.service">openvpn@openvpn.service</a><br>
          <br>
          aby se správně použil configurační soubor v
          /etc/openvpn/openvpn.conf</div>
        <div><br>
        </div>
        <div>Navíc mě napadá, že není uvedený software na klientské
          straně, v mém případě tunnelblick zafungoval bez problémů. V
          případě připojení přímo přes binárku openvpn z klienta jsou
          potřeba extra ip routy. Alespoň tak jsem to pochopil viz.<br>
          <br>
          <a moz-do-not-send="true"
            href="https://wiki.debian.org/OpenVPN#TLS-enabled_VPN">https://wiki.debian.org/OpenVPN#TLS-enabled_VPN</a><br>
          <br>
        </div>
        <div>
          <div>
            <div># cat /etc/openvpn/openvpn.conf</div>
            <div><br>
            </div>
            <div>port 1194</div>
            <div>proto tcp</div>
            <div>dev tun</div>
            <div><br>
            </div>
            <div>push "redirect-gateway def1 bypass-dhcp"</div>
            <div>push "dhcp-option DNS 8.8.8.8"</div>
            <div><br>
            </div>
            <div>ca      /etc/openvpn/easy-rsa/keys/ca.crt    #
              generated keys</div>
            <div>cert    /etc/openvpn/easy-rsa/keys/server.crt</div>
            <div>key     /etc/openvpn/easy-rsa/keys/server.key  # keep
              secret</div>
            <div>dh      /etc/openvpn/easy-rsa/keys/dh2048.pem</div>
            <div><br>
            </div>
            <div>server 10.9.8.0 255.255.255.0  # internal tun0
              connection IP</div>
            <div>ifconfig-pool-persist ipp.txt</div>
            <div><br>
            </div>
            <div>keepalive 10 120</div>
            <div><br>
            </div>
            <div>comp-lzo         # Compression - must be turned on at
              both end</div>
            <div>persist-key</div>
            <div>persist-tun</div>
            <div><br>
            </div>
            <div>status log/openvpn-status.log</div>
            <div><br>
            </div>
            <div>verb 3  # verbose mode</div>
            <div>client-to-client</div>
            <div><br>
            </div>
            <div>pravidla pro iptables</div>
            <div><br>
            </div>
            <div>
              <div># iptables -A INPUT -p tcp -m tcp --dport 1194 -j
                ACCEPT</div>
              <div># iptables -A FORWARD -i venet0 -o tun0 -m state
                --state ESTABLISHED,RELATED -j ACCEPT</div>
              <div># iptables -A FORWARD -s <a moz-do-not-send="true"
                  href="http://10.9.8.0/24"><font color="red"><b>MailScanner
                      has detected a possible fraud attempt from
                      "10.9.8.0" claiming to be</b></font> <font
                    color="red"><b>MailScanner warning: numerical links
                      are often malicious:</b></font> 10.9.8.0/24</a> -o
                venet0 -j ACCEPT</div>
              <div># iptables -t nat -A POSTROUTING -s <a
                  moz-do-not-send="true" href="http://10.9.8.0/24"><font
                    color="red"><b>MailScanner has detected a possible
                      fraud attempt from "10.9.8.0" claiming to be</b></font>
                  <font color="red"><b>MailScanner warning: numerical
                      links are often malicious:</b></font> 10.9.8.0/24</a>
                -o venet0 -j MASQUERADE<br>
              </div>
            </div>
            <div><br>
            </div>
            <div># configurace klienta</div>
            <div><br>
            </div>
            <div>
              <div>client</div>
              <div>dev tun</div>
              <div>proto tcp</div>
              <div>remote <a moz-do-not-send="true"
                  href="http://matousmichalik.cz">matousmichalik.cz</a>
                1194</div>
              <div>resolv-retry infinite</div>
              <div>nobind</div>
              <div>persist-key</div>
              <div>persist-tun</div>
              <div>ns-cert-type server</div>
              <div>comp-lzo</div>
              <div>verb 3</div>
              <div><br>
              </div>
              <div><ca></div>
              <div>-----BEGIN CERTIFICATE-----</div>
              <div>-----END CERTIFICATE-----</div>
              <div></ca></div>
              <div><cert></div>
              <div>-----BEGIN CERTIFICATE-----</div>
              <div>-----END CERTIFICATE-----</div>
              <div></cert></div>
              <div><key></div>
              <div>-----BEGIN PRIVATE KEY-----</div>
              <div>-----END PRIVATE KEY-----</div>
              <div></key></div>
            </div>
            <div><br>
            </div>
            <div>S pozdravem Matouš Michalík</div>
            <div><br>
            </div>
            <br>
            <div class="gmail_quote">
              <div dir="ltr">pá 6. 1. 2017 v 19:00 odesílatel Pavel
                Švojgr <<a moz-do-not-send="true"
                  href="mailto:pavel@svojgr.com">pavel@svojgr.com</a>>
                napsal:<br>
              </div>
              <blockquote class="gmail_quote" style="margin:0 0 0
                .8ex;border-left:1px #ccc solid;padding-left:1ex">
                <div bgcolor="#FFFFFF" text="#000000" class="gmail_msg">
                  # cat /proc/sys/net/ipv4/ip_forward  <br
                    class="gmail_msg">
                  1<br class="gmail_msg">
                  <br class="gmail_msg">
                  <br class="gmail_msg">
                  <div class="m_1420145581237843505moz-cite-prefix
                    gmail_msg">Dne 6.1.2017 v 18:39 Martin Doucha
                    napsal(a):<br class="gmail_msg">
                  </div>
                </div>
                <div bgcolor="#FFFFFF" text="#000000" class="gmail_msg">
                  <blockquote type="cite" class="gmail_msg">
                    <pre class="gmail_msg">Dne 6.1.2017 v 18:17 Pavel Švojgr napsal(a):
</pre>
                    <blockquote type="cite" class="gmail_msg">
                      <pre class="gmail_msg">Ahoj,

snazim se nastavit openvpn server tak, abych pres nej mohl pristupovat
dal do inernetu, ale nedari se mi to.
Sel jsem podle tohoto navodu:
<a moz-do-not-send="true" class="m_1420145581237843505moz-txt-link-freetext gmail_msg" href="https://blog.sslmarket.cz/ssl/nastaveni-openvpn-na-serveru-s-debian-8-jessie/" target="_blank">https://blog.sslmarket.cz/ssl/nastaveni-openvpn-na-serveru-s-debian-8-jessie/</a>


a podari se mi pres vpn dostat na server, ale dal uz ne (ani nepingnu).

# cat /etc/sysctl.conf |grep ip_forward
net.ipv4.ip_forward=1
</pre>
                    </blockquote>
                    <pre class="gmail_msg">Tak začneme tou nejhloupější kontrolou. Co vypíše tenhle příkaz?
$ cat /proc/sys/net/ipv4/ip_forward

S pozdravem,
Martin Doucha

</pre>
                    <br class="gmail_msg">
                    <fieldset
                      class="m_1420145581237843505mimeAttachmentHeader
                      gmail_msg"></fieldset>
                    <br class="gmail_msg">
                    <pre class="gmail_msg">_______________________________________________
Community-list mailing list
<a moz-do-not-send="true" class="m_1420145581237843505moz-txt-link-abbreviated gmail_msg" href="mailto:Community-list@lists.vpsfree.cz" target="_blank">Community-list@lists.vpsfree.cz</a>
<a moz-do-not-send="true" class="m_1420145581237843505moz-txt-link-freetext gmail_msg" href="http://lists.vpsfree.cz/listinfo/community-list" target="_blank">http://lists.vpsfree.cz/listinfo/community-list</a>
</pre>
                  </blockquote>
                  <br class="gmail_msg">
                </div>
                <div bgcolor="#FFFFFF" text="#000000" class="gmail_msg">
                  <pre class="m_1420145581237843505moz-signature gmail_msg" cols="72">-- 
S pozdravem Ing. Pavel Švojgr
</pre>
                </div>
                _______________________________________________<br
                  class="gmail_msg">
                Community-list mailing list<br class="gmail_msg">
                <a moz-do-not-send="true"
                  href="mailto:Community-list@lists.vpsfree.cz"
                  class="gmail_msg" target="_blank">Community-list@lists.vpsfree.cz</a><br
                  class="gmail_msg">
                <a moz-do-not-send="true"
                  href="http://lists.vpsfree.cz/listinfo/community-list"
                  rel="noreferrer" class="gmail_msg" target="_blank">http://lists.vpsfree.cz/listinfo/community-list</a><br
                  class="gmail_msg">
              </blockquote>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Community-list mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Community-list@lists.vpsfree.cz">Community-list@lists.vpsfree.cz</a>
<a class="moz-txt-link-freetext" href="http://lists.vpsfree.cz/listinfo/community-list">http://lists.vpsfree.cz/listinfo/community-list</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
S pozdravem Ing. Pavel Švojgr
</pre>
  </body>
</html>