Skocz do zawartości

miras

Użytkownicy
  • Zawartość

    106
  • Rejestracja

  • Ostatnio

Posty napisane przez miras


  1. Witam, 

    Muszę się połączyć z vpn cisco a nastepnie połączyć się do serwera przez sftp, problem w tym, że po połączeniu z tym vpn nie mogę się połączyć z żadnym serwerem (ftp, ssh, sftp - nic) po ustawieniu "pośrednika sieciowego" internet w przeglądarce działa normalnie (komunikatory również), ma ktoś jakiś pomysł co może być nie tak? Ubuntu 16.04,  Cisco AnyConnect Secure Mobility Client Version 4.10.01075


  2. Witam, testuje sobie pewną rzecz, zrobiłem retransmisję ffmpeg rtmp / http HLS,

     

    mój nginx.conf wygląda następująco:

    worker_processes  auto;
    events {
        worker_connections  1024;
    }
    
    # RTMP configuration
    rtmp {
        server {
            listen 1935; # Listen on standard RTMP port
            chunk_size 4000;
    
            application show {
                live on;
                # Turn on HLS
                hls on;
                hls_path /mnt/hls/;
                hls_fragment 3;
                hls_playlist_length 380;
                # disable consuming the stream from nginx as rtmp
                deny play all;
            }
        }
    }
    
    http {
        sendfile off;
        tcp_nopush on;
        directio 512;
        default_type application/octet-stream;
    
        server {
            listen 8080;
    
            location / {
                # Disable cache
                add_header 'Cache-Control' 'no-cache';
    
                # CORS setup
                add_header 'Access-Control-Allow-Origin' '*' always;
                add_header 'Access-Control-Expose-Headers' 'Content-Length';
    
                # allow CORS preflight requests
                if ($request_method = 'OPTIONS') {
                    add_header 'Access-Control-Allow-Origin' '*';
                    add_header 'Access-Control-Max-Age' 1728000;
                    add_header 'Content-Type' 'text/plain charset=UTF-8';
                    add_header 'Content-Length' 0;
                    return 204;
                }
    
                types {
                    application/dash+xml mpd;
                    application/vnd.apple.mpegurl m3u8;
                    video/mp2t ts;
                }
    
                root /mnt/;
            }
        }
    }
    
    

    Retransmisję odpalam z takimi parametrami:

    ffmpeg -i "'.$rtmp_in.'" -ar 44100 -vcodec libx264 -r 25 -b:v 500k -f flv "'.$rtmp_out.'"
    

    Mam 500 Mbit łącza, lokalizacja polska serwera transmisję oglądam tylko ja i zdarza się, że transmisja się zacina, ma ktoś pomysł co może miec wpływ na te zacięcia i ewentualnie jak się tego pozbyć?

    Czy transmisja, która retransmituje ma na to wpływ? Jezeli tak czy jest możliwość wprowadzenia jakiegoś np. opóźnienia, żeby ominąć te zacięcia?

    Dziękuję z góry!


  3. Witam, to mój server.conf:

                                                                         
    port 1194
    proto udp
    dev tun
    
    ca ca.crt
    cert server.crt
    key server.key
    dh dh.pem
    
    server 10.8.0.0 255.255.255.0
    ifconfig-pool-persist ipp.txt
    push "redirect-gateway autolocal"
    keepalive 10 120
    #tls-auth ta.key 0
    
    cipher none
    persist-key
    persist-tun
    verify-client-cert none
    
    plugin /usr/lib/openvpn/openvpn-plugin-auth-pam.so login
    status openvpn-status.log
    log-append  /var/log/openvpn.log
    verb 3
    explicit-exit-notify 0
    
    
    

    użytkowników do vpna dodaje normalnie: sudo adduser nazwausera itp.

     

    W jaki sposób zrobić tak, żeby na jednym dodanym koncie w tym samym momencie mogłabyć podłączona tylko max 1 osoba?


  4. Witam, mam na sprzedaż projekt, z którego klient najprawdopodobniej zrezygnował, nie wpłacił zwyczajnie ostatniej transzy, co za tym idzie postanowiłem go sprzedać za kwotę właśnie tej ostatniej transzy. Klient zainwestował w to dużo więcej, kontakt się urwał, nie mam pojęcia co się stało.

     

    Ogólnie jest to system giełdy skinów csgo, wpłacanie(skinów, kluczy), wypłacanie(paypal, skrill, skiny, btc),

    Czat, lista ofert, inteligentne filtry, wyszukiwarka, wyliczanie średniej wartości skinu, lista ulubionych, powiadomienia dźwiękowe/email, notyfikacje, konto Premium (wtedy się nie płaci podatku dla strony od wystawionej oferty sprzedaży), lista ofert, każdy skin ma pobierany float, boty w nodejs do obsługi steam'a i jeszcze masa funkcjonalności, o których w tym momencie nie pamiętam.

     

    System jest skończony i przetestowany zostało jedynie wdrożyć to na jakiś serwer, podpiąć domenę i można działać.

     

    Cena to 6000zł

     

    Poważnie zainteresowanych zapraszam na priv, tam dostarczę wszystkich szczegółów.


  5. mam tylko openvpn.log

     

    i w nim jest teraz:

    Tue Nov 14 21:34:15 2017 83.9.18.158:47963 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
    Tue Nov 14 21:34:15 2017 83.9.18.158:47963 TLS Error: TLS handshake failed
    Tue Nov 14 21:34:18 2017 83.9.18.158:39174 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
    Tue Nov 14 21:34:18 2017 83.9.18.158:39174 TLS Error: TLS handshake failed
    Tue Nov 14 21:34:20 2017 83.9.18.158:40354 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
    Tue Nov 14 21:34:20 2017 83.9.18.158:40354 TLS Error: TLS handshake failed
    Tue Nov 14 21:34:22 2017 83.9.18.158:50763 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
    Tue Nov 14 21:34:22 2017 83.9.18.158:50763 TLS Error: TLS handshake failed
    Tue Nov 14 21:34:24 2017 83.9.18.158:52278 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
    
    

     

    i server.conf:

      GNU nano 2.7.4                                                                              File: /etc/openvpn/server.conf                                                                                        
    
    local 192.168.2.108 # Wpisz adres IP Twojego Raspberry Pi
    dev tun
    proto udp #Niektórzy musza uzywac TCP, zmien jesli wiesz co robisz.
    port 1723
    ca /etc/openvpn/easy-rsa/keys/ca.crt
    cert /etc/openvpn/easy-rsa/keys/ca.crt # zmien na nazwe klucza twojego serwera
    key /etc/openvpn/easy-rsa/keys/ca.key # zmien na nazwe klucza twojego serwera
    dh /etc/openvpn/easy-rsa/keys/dh2048.pem # jesli wybrales szyfrowanie 2048 bitowe, zmien tutaj!
    server 10.8.0.0 255.255.255.0
    ifconfig 10.8.0.1 10.8.0.2
    push "route 10.8.0.1 255.255.255.255"
    push "route 10.8.0.0 255.255.255.0"
    push "topology subnet"
    # Ponizej dane Twojej sieci
    push "route 192.168.2.108 255.255.255.0" # zmien z numerem IP i maski Twojego Raspberry
    # Dodaj adres DNS
    # jesli Twoj router nie robi za serwer DNS, mozesz, uzyc DNS Google 8.8.8.8
    push "dhcp-option DNS 8.8.8.8" # Zazwyczaj bedzie to adres Twojego routera
    push "redirect-gateway def1"
    client-to-client
    mode server
    tls-server
    duplicate-cn
    keepalive 10 120
    tls-auth /etc/openvpn/easy-rsa/keys/ta.key 0
    cipher none
    comp-lzo
    user nobody
    group nogroup
    persist-key
    persist-tun
    status /var/log/openvpn-status.log 20
    log /var/log/openvpn.log
    verb 1
    reneg-sec 0
    
    
    

  6. Tak, masz rację, port jest zajęty przez pptpd, bo tylko ten port mam obecnie przekierowany na routerze i nie mam dostępu do reszty na chwilę obecną, ale podczas próby połączenia się z vpn stopowałem pptpd i nic to nie pomagało.

     

    @@

     

    Może to przez to, że źle to ubijam?

     

    sudo systemctl stop pptpd

     

     

    Jak zrobiłem sudo killall pptpd to w logach openvpn'a mam teraz to:

    
    Thu Nov  9 17:45:58 2017 OpenVPN 2.4.0 arm-unknown-linux-gnueabihf [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Jul 18 2017
    Thu Nov  9 17:45:58 2017 library versions: OpenSSL 1.0.2l  25 May 2017, LZO 2.08
    Thu Nov  9 17:45:58 2017 TUN/TAP device tun0 opened
    Thu Nov  9 17:45:58 2017 do_ifconfig, tt->did_ifconfig_ipv6_setup=0
    Thu Nov  9 17:45:58 2017 /sbin/ip link set dev tun0 up mtu 1500
    Thu Nov  9 17:45:58 2017 /sbin/ip addr add dev tun0 local 10.8.0.1 peer 10.8.0.2
    Thu Nov  9 17:45:58 2017 Could not determine IPv4/IPv6 protocol. Using AF_INET
    Thu Nov  9 17:45:58 2017 UDPv4 link local (bound): [AF_INET]192.168.2.108:1723
    Thu Nov  9 17:45:58 2017 UDPv4 link remote: [AF_UNSPEC]
    Thu Nov  9 17:45:58 2017 GID set to nogroup
    Thu Nov  9 17:45:58 2017 UID set to nobody
    Thu Nov  9 17:45:58 2017 Initialization Sequence Completed
    
    

  7. Wydaje mi się, że dobre porty.

     

    uname -a && lsb_release -a

    Linux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l GNU/Linux
    No LSB modules are available.
    Distributor ID:	Raspbian
    Description:	Raspbian GNU/Linux 9.1 (stretch)
    Release:	9.1
    Codename:	stretch
    
    

    W jaki sposób mam wyświetlić te logi z firewalla? (nic nie mogłem znaleźć).

     


  8. Witam, próbuję postawić openvpn na rp3 wszystko przebiegło poprawnie, natomiast przy próbie połączenia przez klienta na androidzie pasek dochodzi do połowy i stoi, później jest timeout.

     

     

    openvpn.log:

    Wed Nov  8 14:34:37 2017 OpenVPN 2.4.0 arm-unknown-linux-gnueabihf [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Jul 18 2017
    Wed Nov  8 14:34:37 2017 library versions: OpenSSL 1.0.2l  25 May 2017, LZO 2.08
    Wed Nov  8 14:34:37 2017 TUN/TAP device tun0 opened
    Wed Nov  8 14:34:37 2017 do_ifconfig, tt->did_ifconfig_ipv6_setup=0
    Wed Nov  8 14:34:37 2017 /sbin/ip link set dev tun0 up mtu 1500
    Wed Nov  8 14:34:37 2017 /sbin/ip addr add dev tun0 local 10.8.0.1 peer 10.8.0.2
    Wed Nov  8 14:34:37 2017 Could not determine IPv4/IPv6 protocol. Using AF_INET
    Wed Nov  8 14:34:37 2017 TCP/UDP: Socket bind failed on local address [AF_INET]192.168.2.108:1723: Cannot assign requested address
    Wed Nov  8 14:34:37 2017 Exiting due to fatal error
    Wed Nov  8 14:34:37 2017 /sbin/ip addr del dev tun0 local 10.8.0.1 peer 10.8.0.2
    
    
    

    server.conf:

    
    local 192.168.2.108 # Wpisz adres IP Twojego Raspberry Pi
    dev tun
    proto udp #Niektórzy musza uzywac TCP, zmien jesli wiesz co robisz.
    port 1723
    ca /etc/openvpn/easy-rsa/keys/ca.crt
    cert /etc/openvpn/easy-rsa/keys/ca.crt # zmien na nazwe klucza twojego serwera
    key /etc/openvpn/easy-rsa/keys/ca.key # zmien na nazwe klucza twojego serwera
    dh /etc/openvpn/easy-rsa/keys/dh2048.pem # jesli wybrales szyfrowanie 2048 bitowe, zmien tutaj!
    server 10.8.0.0 255.255.255.0
    ifconfig 10.8.0.1 10.8.0.2
    push "route 10.8.0.1 255.255.255.255"
    push "route 10.8.0.0 255.255.255.0"
    # Ponizej dane Twojej sieci
    push "route 192.168.2.108 255.255.255.0" # zmien z numerem IP i maski Twojego Raspberry
    # Dodaj adres DNS
    # jesli Twoj router nie robi za serwer DNS, mozesz, uzyc DNS Google 8.8.8.8
    push "dhcp-option DNS 8.8.8.8" # Zazwyczaj bedzie to adres Twojego routera
    push "redirect-gateway def1"
    client-to-client
    duplicate-cn
    keepalive 10 120
    tls-auth /etc/openvpn/easy-rsa/keys/ta.key 0
    cipher AES-128-CBC
    comp-lzo
    user nobody
    group nogroup
    persist-key
    persist-tun
    status /var/log/openvpn-status.log 20
    log /var/log/openvpn.log
    verb 1
    
    
    

    Ma ktoś jakiś pomysł co może być nie tak?


  9. Zwracać nic nie zwraca, po zapisaniu, iptables -L zwraca to:

    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination         
    ACCEPT     tcp  --  anywhere             anywhere             tcp spt:domain
    ACCEPT     udp  --  anywhere             anywhere             udp spt:domain
    REJECT     tcp  --  62.138.238.0/24      anywhere             tcp dpt:http reject-with icmp-port-unreachable
    REJECT     tcp  --  62.138.239.0/24      anywhere             tcp dpt:http reject-with icmp-port-unreachable
    
    Chain FORWARD (policy DROP)
    target     prot opt source               destination         
    ACCEPT     udp  --  anywhere             anywhere             udp dpt:domain
    ACCEPT     tcp  --  anywhere             skrill.com           tcp dpt:http
    ACCEPT     tcp  --  anywhere             skrill.com           tcp dpt:https
    DROP       tcp  --  anywhere             anywhere             tcp dpt:http
    DROP       tcp  --  anywhere             anywhere             tcp dpt:https
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination         
    ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:domain
    ACCEPT     udp  --  anywhere             anywhere             udp dpt:domain
    ACCEPT     all  --  anywhere             anywhere            
    ACCEPT     all  --  anywhere             anywhere            
    REJECT     tcp  --  62.138.238.0/24      anywhere             tcp dpt:http reject-with icmp-port-unreachable
    

  10. Ogólnie teraz reguły wyglądają tak:

    sudo iptables -F FORWARD
    sudo iptables -F INPUT 
    sudo iptables -F OUTPUT 
    
    
    sudo iptables -A OUTPUT -j ACCEPT
    sudo iptables -A FORWARD -p tcp --dport 53 -d skrill.com -j ACCEPT
    sudo iptables -A FORWARD -p udp --dport 53 -d skrill.com -j ACCEPT
    sudo iptables -A FORWARD -p tcp --dport 80 -d skrill.com -j ACCEPT
    sudo iptables -A FORWARD -p tcp --dport 443 -d skrill.com -j ACCEPT
    sudo iptables -A FORWARD -p tcp --dport 80  -j DROP
    sudo iptables -A FORWARD -p tcp --dport 443  -j DROP
    sudo iptables -A OUTPUT -j ACCEPT
    sudo iptables-save
    
    

    efektem czego jest to, że nie mogę wejść konkretnie na żadną stronę oprócz google.pl i co ciekawsze mogę normalnie wyszukiać w google, ale nie mogę już wejść na konkretną stronę nawet z tych wyników wyszukiania...


  11. Ruch jest na pewno na porcie 1723, przy takiej konfiguracji ssh mam otwarte, ale 1723 juz nie, co robię źle?

    sudo iptables -P INPUT DROP
    sudo iptables -P OUTPUT DROP
    sudo iptables -A INPUT -i lo -j ACCEPT
    sudo iptables -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
    sudo iptables -A OUTPUT -o lo -j ACCEPT
    sudo iptables -A OUTPUT -p tcp --sport 22 -m state --state ESTABLISHED -j ACCEPT
    
    
    iptables -A INPUT -p gre -j ACCEPT
    iptables -A OUTPUT -p gre -j ACCEPT
    iptables -A INPUT -p tcp --sport 1723 -j ACCEPT
    iptables -A OUTPUT -p tcp --dport 1723 -j ACCEPT
    
    
    
    sudo iptables-save
    
    
    

    Jeszcze iptables -L:

    Chain INPUT (policy DROP)
    target     prot opt source               destination         
    ACCEPT     gre  --  anywhere             anywhere            
    ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:1723 state NEW
    ACCEPT     all  --  10.0.0.0/8           anywhere            
    ACCEPT     gre  --  anywhere             anywhere            
    ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:1723 state NEW
    ACCEPT     all  --  anywhere             anywhere            
    ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ssh
    ACCEPT     all  --  anywhere             anywhere             state NEW
    ACCEPT     all  --  anywhere             anywhere            
    ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ssh
    ACCEPT     all  --  anywhere             anywhere             state NEW
    ACCEPT     all  --  anywhere             anywhere            
    ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ssh
    ACCEPT     all  --  anywhere             anywhere             state NEW
    ACCEPT     all  --  anywhere             anywhere            
    ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ssh
    ACCEPT     all  --  anywhere             anywhere            
    ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ssh
    ACCEPT     all  --  anywhere             anywhere            
    ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ssh
    ACCEPT     all  --  anywhere             anywhere            
    ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ssh
    ACCEPT     all  --  anywhere             anywhere            
    ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ssh
    ACCEPT     gre  --  anywhere             anywhere            
    ACCEPT     tcp  --  anywhere             anywhere             tcp spt:1723
    ACCEPT     gre  --  anywhere             anywhere            
    ACCEPT     tcp  --  anywhere             anywhere             tcp spt:1723
    ACCEPT     all  --  anywhere             anywhere            
    ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ssh
    ACCEPT     gre  --  anywhere             anywhere            
    ACCEPT     tcp  --  anywhere             anywhere             tcp spt:1723
    ACCEPT     all  --  anywhere             anywhere            
    ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ssh
    ACCEPT     gre  --  anywhere             anywhere            
    ACCEPT     tcp  --  anywhere             anywhere             tcp spt:1723
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination         
    TCPMSS     tcp  --  192.168.2.0/24       anywhere             tcp flags:SYN,RST/SYN TCPMSS clamp to PMTU
    ACCEPT     all  --  anywhere             anywhere            
    ACCEPT     all  --  anywhere             anywhere            
    
    Chain OUTPUT (policy DROP)
    target     prot opt source               destination         
    ACCEPT     all  --  anywhere             anywhere            
    ACCEPT     tcp  --  anywhere             anywhere             tcp spt:ssh state ESTABLISHED
    ACCEPT     all  --  anywhere             anywhere             state NEW
    ACCEPT     all  --  anywhere             anywhere            
    ACCEPT     tcp  --  anywhere             anywhere             tcp spt:ssh state ESTABLISHED
    ACCEPT     all  --  anywhere             anywhere             state NEW
    ACCEPT     all  --  anywhere             anywhere            
    ACCEPT     tcp  --  anywhere             anywhere             tcp spt:ssh state ESTABLISHED
    ACCEPT     all  --  anywhere             anywhere             state NEW
    ACCEPT     all  --  anywhere             anywhere            
    ACCEPT     tcp  --  anywhere             anywhere             tcp spt:ssh state ESTABLISHED
    ACCEPT     all  --  anywhere             anywhere            
    ACCEPT     tcp  --  anywhere             anywhere             tcp spt:ssh state ESTABLISHED
    ACCEPT     all  --  anywhere             anywhere            
    ACCEPT     tcp  --  anywhere             anywhere             tcp spt:ssh state ESTABLISHED
    ACCEPT     all  --  anywhere             anywhere            
    ACCEPT     tcp  --  anywhere             anywhere             tcp spt:ssh state ESTABLISHED
    ACCEPT     all  --  anywhere             anywhere            
    ACCEPT     tcp  --  anywhere             anywhere             tcp spt:ssh state ESTABLISHED
    ACCEPT     gre  --  anywhere             anywhere            
    ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:1723
    ACCEPT     gre  --  anywhere             anywhere            
    ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:1723
    ACCEPT     all  --  anywhere             anywhere            
    ACCEPT     tcp  --  anywhere             anywhere             tcp spt:ssh state ESTABLISHED
    ACCEPT     gre  --  anywhere             anywhere            
    ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:1723
    ACCEPT     all  --  anywhere             anywhere            
    ACCEPT     tcp  --  anywhere             anywhere             tcp spt:ssh state ESTABLISHED
    ACCEPT     gre  --  anywhere             anywhere            
    ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:1723
    
    
×