Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Omijanie monitoringu http
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish) Polish OTW
View previous topic :: View next topic  
Author Message
quosek
Apprentice
Apprentice


Joined: 07 Mar 2006
Posts: 269

PostPosted: Mon Jan 28, 2008 8:18 am    Post subject: Omijanie monitoringu http Reply with quote

czesc
cudowna korporacja w ktorej pracuje stwierdzila, ze za bardzo sie obijamy i za duzo serfujemy po necie i zaczyna wprowadzac kontrole neta - serwery proxy, ktore niedosc, ze odrzucaja czesc ruchu (po adresach i slowach kluczowych) to jeszcze maja robic statystyki - kto gdzie ile itd.
jaki jest sposob na ominiecie tego z uwzglednieniem:
- mam serwerek na gentoo podpiety pod neo512 (moge przekierowac dowolne porty)
- komp w sieci firmowej jest w 100% zarzadzalny przeze mnie
- zalezy mi na szyfrowanym dostepie do neta (najchetniej by szyfracji podlegalo wszsytko - od odpytywan dns do caly ruch [moze z wyjatkiem tego co juz jest https - ale to bez roznicy])
- najchetniej by zuzywalo to jak najmniej transferu na kompie domowym
- wszystkie pakiety skierowane do sieci lokalnej firmy (definiowanych zakresow) ida bezposrednio (z pominieciem mojego tunelu)

jak najwydajniej cos takiego postawic ? openvpn ? jakis proxy ? tunelowanie przez ssh ? jakies podpowiedzi ?
Back to top
View user's profile Send private message
SlashBeast
Retired Dev
Retired Dev


Joined: 23 May 2006
Posts: 2922

PostPosted: Mon Jan 28, 2008 9:13 am    Post subject: Reply with quote

Code:
ssh TwójUser@HostnameAlboIpTwojejNerwostrad -D 31337 -v -N -C
to wstukujesz na komputerze firmowym, o ile na domowym masz sshd odpalone. teraz konfigurujesz przeglądarke by używałą proxy socks5 o adresie localhost i porcie 31337. Ruch będzie szyfrowany i kompresowany (patrz przełącznik -C ) Jeżeli puszcza Ci np. tylko ruch na port 8080 postaw na takim porcie sshd u siebie i dodaj przełącznik -p 8080. Przełączniki kolejno -D stawia socks5 na porcie 31337, -v debuguje, można dać -vv, generalnie mówi nam, że coś przelatuje przez proxy, następnie -N nie otwiera na koniec szela, powłoki, a -C jak już mówiłem kompresuje ruch - przydatne biorąc pod uwage, że neo 512 ma upload 128kbps. Jeżeli na komputerze w firmie masz windowsa, możesz użyć putty on potrafi w taki sam sposób tunnelować, albo może nawet openssh po cygwinie.
Back to top
View user's profile Send private message
Kurt Steiner
Bodhisattva
Bodhisattva


Joined: 01 Apr 2005
Posts: 1050
Location: Ostroleka, Polska

PostPosted: Mon Jan 28, 2008 10:13 am    Post subject: Reply with quote

Tor może się tu również całkiem dobrze sprawdzać.
_________________
Proszę, pamiętaj o regulaminie, a jeśli zauważysz, że został on złamany, zgłoś to. :)

LRU:431698
Back to top
View user's profile Send private message
quosek
Apprentice
Apprentice


Joined: 07 Mar 2006
Posts: 269

PostPosted: Mon Jan 28, 2008 10:54 am    Post subject: Reply with quote

dzieki za tunelowanie ssh
tymczasowo zrealizowalem to na openvpn i zobaczymy jak to bedzie dzialac (wydajnosciowo)
Back to top
View user's profile Send private message
n0rbi666
l33t
l33t


Joined: 04 Mar 2005
Posts: 707
Location: \Poland\Krakow

PostPosted: Mon Jan 28, 2008 5:17 pm    Post subject: Reply with quote

Hm, podepnę się do tematu - na uczelni nam poblokowali strony (i to czymś bardzo głupim - nie można nawet w google wyszukać słowa proxy :D ) - a z drugiej strony, z czystej ciekawości :)

Próbowałem tunel ssh (ssh -D) - na dwóch serwerach, ale przy obu przy próbie wczytania strony pojawia się po prostu pusta strona...
Czy ja coś źle robię, czy to może kwestia konfiguracji serwera ssh ? Czy problemem może być to, że serwer znajduje się za NAT i ma tylko ssh forwardowane ?
Back to top
View user's profile Send private message
Odinist
Apprentice
Apprentice


Joined: 09 Aug 2006
Posts: 176
Location: Silesia, Poland

PostPosted: Mon Jan 28, 2008 7:11 pm    Post subject: Reply with quote

Jeżeli działa połączenie ssh to "proxy" też powinno. Jakiej komendy używasz?
Back to top
View user's profile Send private message
n0rbi666
l33t
l33t


Joined: 04 Mar 2005
Posts: 707
Location: \Poland\Krakow

PostPosted: Mon Jan 28, 2008 9:11 pm    Post subject: Reply with quote

Odinist wrote:
Jeżeli działa połączenie ssh to "proxy" też powinno. Jakiej komendy używasz?

Połączenie na pewno działa
próbowałem kilku komend, i dla np
Code:
ssh xxx@xxx -L 10080:www.google.pl:80
Działa
ale już np
Code:
xxx@xxx -D 8080 -v -N -C

lub
Code:
ssh xxx@xxx -p 666 -D 8080
Nie działa ...
W konsoli output po podaniu hasła i próbie wejścia na stronę :
Code:
debug1: Enabling compression at level 6.
debug1: Authentication succeeded (password).
debug1: Local connections to LOCALHOST:31337 forwarded to remote address socks:0
debug1: Local forwarding listening on 127.0.0.1 port 31337.
debug1: channel 0: new [port listener]
socket: Address family not supported by protocol
debug1: Entering interactive session.
debug1: Connection to port 31337 forwarding to socks port 0 requested.
debug1: channel 1: new [dynamic-tcpip]
debug1: channel 1: free: dynamic-tcpip, nchannels 2
debug1: Connection to port 31337 forwarding to socks port 0 requested.
debug1: channel 1: new [dynamic-tcpip]
debug1: channel 1: free: dynamic-tcpip, nchannels 2
Back to top
View user's profile Send private message
SlashBeast
Retired Dev
Retired Dev


Joined: 23 May 2006
Posts: 2922

PostPosted: Mon Jan 28, 2008 9:22 pm    Post subject: Reply with quote

Quote:
debug1: Enabling compression at level 6.
debug1: Authentication succeeded (password).
debug1: Local connections to LOCALHOST:31337 forwarded to remote address socks:0
debug1: Local forwarding listening on 127.0.0.1 port 31337.
debug1: channel 0: new [port listener]
socket: Address family not supported by protocol
debug1: Entering interactive session.
debug1: Connection to port 31337 forwarding to socks port 0 requested.
Coś dziwne, forwarduje CI port mimo iż nie wstukałeś tego?


U mnie przykładowy tunnel:
Code:
slashbeast@jinchuuriki ~ % ssh slashbeast@cpaste.com -D 1234 -v -N -C
OpenSSH_4.7p1, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to cpaste.com [194.1.144.17] port 22.
debug1: Connection established.
debug1: identity file /home/slashbeast/.ssh/identity type -1
debug1: identity file /home/slashbeast/.ssh/id_rsa type 1
debug1: identity file /home/slashbeast/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.7
debug1: match: OpenSSH_4.7 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.7
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 zlib@openssh.com
debug1: kex: client->server aes128-cbc hmac-md5 zlib@openssh.com
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'cpaste.com' is known and matches the RSA host key.
debug1: Found key in /home/slashbeast/.ssh/known_hosts:5
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /home/slashbeast/.ssh/identity
debug1: Offering public key: /home/slashbeast/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: read PEM private key done: type RSA
debug1: Enabling compression at level 6.
debug1: Authentication succeeded (publickey).
debug1: Local connections to LOCALHOST:1234 forwarded to remote address socks:0
debug1: Local forwarding listening on 127.0.0.1 port 1234.
debug1: channel 0: new [port listener]
socket: Address family not supported by protocol
debug1: Entering interactive session.
Back to top
View user's profile Send private message
n0rbi666
l33t
l33t


Joined: 04 Mar 2005
Posts: 707
Location: \Poland\Krakow

PostPosted: Mon Jan 28, 2008 9:30 pm    Post subject: Reply with quote

Eeee czego nie wstukałem ?
u mnie cały output :
Code:
ssh xxx@XXX -D 8080 -v -N -C
OpenSSH_4.7p1, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to XXX [X.X.X.X] port 22.
debug1: Connection established.
debug1: identity file /home/n0rbi/.ssh/identity type -1
debug1: identity file /home/n0rbi/.ssh/id_rsa type -1
debug1: identity file /home/n0rbi/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.7
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 zlib@openssh.com
debug1: kex: client->server aes128-cbc hmac-md5 zlib@openssh.com
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'torus.uck.pk.edu.pl' is known and matches the RSA host key.
debug1: Found key in /home/n0rbi/.ssh/known_hosts:4
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/n0rbi/.ssh/identity
debug1: Trying private key: /home/n0rbi/.ssh/id_rsa
debug1: Trying private key: /home/n0rbi/.ssh/id_dsa
debug1: Next authentication method: password
xxx@xxx's password:
debug1: Enabling compression at level 6.
debug1: Authentication succeeded (password).
debug1: Local connections to LOCALHOST:8080 forwarded to remote address socks:0
debug1: Local forwarding listening on 127.0.0.1 port 8080.
debug1: channel 0: new [port listener]
socket: Address family not supported by protocol
debug1: Entering interactive session.
debug1: Connection to port 8080 forwarding to socks port 0 requested.
debug1: channel 1: new [dynamic-tcpip]
debug1: channel 1: free: dynamic-tcpip, nchannels 2
debug1: Connection to port 8080 forwarding to socks port 0 requested.
debug1: channel 1: new [dynamic-tcpip]
debug1: channel 1: free: dynamic-tcpip, nchannels 2
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish) Polish OTW All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum