Sponsored Content
Special Forums IP Networking Multiple wan connection on single PC Post 302502868 by huskie69 on Wednesday 9th of March 2011 05:57:12 AM
Old 03-09-2011
Quote:
Originally Posted by DGPickett
Disregarding any corporate security guidelines, if you ensure there is no forwarding turned on in your IP stack, or any other protocol, or ARP publishing, and you can get the tether to run at the same time, then your problem is routing table setup.

Setting a corporate proxy in the ie/firefox browsers might help make this work, since you are just browsing. Then, you just need routing for the proxy and any other corporate applications.
I intend to do any private browsing inside a VM - the VM should pick up the the tethered connection directly from the USB port (VMware player) so I could disable software nic connection and use only the tethered smartphone connection for the internet connection. Is this possible?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Get two variables from oracle in a single connection

Hi all In my script i am getting two variables year and month from oracle by making two connections. In the first connection i am getting varaibel year and again i am making another connection and getting month variable from oracle. Is there any way i can get two field values from oracle and... (1 Reply)
Discussion started by: vasuarjula
1 Replies

2. Solaris

Solaris 10 ftp connection problem (connection refused, connection timed out)

Hi everyone, I am hoping anyone of you could help me in this weird problem we have in 1 of our Solaris 10 servers. Lately, we have been having some ftp problems in this server. Though it can ping any server within the network, it seems that it can only ftp to a select few. For most servers, the... (4 Replies)
Discussion started by: labdakos
4 Replies

3. Shell Programming and Scripting

Execute multiple SQL scripts from single SQL Plus connection

Hi! I would like to do a single connection to sqlplus and execute some querys. Actually I do for every query one connection to database i.e echo 'select STATUS from v$instance; exit' > $SQL_FILE sqlplus user/pass@sid @$SQL_FILE > $SELECT_RESULT echo 'select VERSION from v$instance;... (6 Replies)
Discussion started by: guif
6 Replies

4. UNIX for Dummies Questions & Answers

Grep multiple strings in multiple files using single command

Hi, I will use below command for grep single string ("osuser" is search string) ex: find . -type f | xarg grep -il osuser but i have one more string "v$session" here i want to grep in which file these two strings are present. any help is appreciated, Thanks in advance. Gagan (2 Replies)
Discussion started by: gagan4599
2 Replies

5. Shell Programming and Scripting

SQL query in a loop with single sqlplus connection

Hi, I'm trying to build a shell script that reads a set of accounts from a file. For each account I need to perform a set of sql queries. So I have a loop with a set of sqlplus connections to retrieved my data. Is it possible to have a single sqlplus connection before entering the loop and... (4 Replies)
Discussion started by: lsantacana
4 Replies

6. Shell Programming and Scripting

Multiple lines in a single column to be merged as a single line for a record

Hi, I have a requirement with, No~Dt~Notes 1~2011/08/1~"aaa bbb ccc ddd eee fff ggg hhh" Single column alone got splitted into multiple lines. I require the output as No~Dt~Notes 1~2011/08/1~"aaa<>bbb<>ccc<>ddd<>eee<>fff<>ggg<>hhh" mean to say those new lines to be... (1 Reply)
Discussion started by: Bhuvaneswari
1 Replies

7. Red Hat

How to Multiple internet connections manage into a single connection.

Dear all, Hope you are all fine & enjoying your good health. Look at this equation 1+1+1=3 So simple I just want to say that I have three internet connections of 1mb, 1mb & 1mb but I can use only 1mb connection at a time & other two connections are useless for me. But now I want to make all... (0 Replies)
Discussion started by: saqlain.bashir
0 Replies

8. Shell Programming and Scripting

Awk match multiple columns in multiple lines in single file

Hi, Input 7488 7389 chr1.fa chr1.fa 3546 9887 chr5.fa chr9.fa 7387 7898 chrX.fa chr3.fa 7488 7389 chr21.fa chr3.fa 7488 7389 chr1.fa chr1.fa 3546 9887 chr9.fa chr5.fa 7898 7387 chrX.fa chr3.fa Desired Output 7488 7389 chr1.fa chr1.fa 2 3546 9887 chr5.fa chr9.fa 2... (2 Replies)
Discussion started by: jacobs.smith
2 Replies

9. IP Networking

Internet connection single interface through vpn

Hi. Can you please help me with a routing problem? There are 2 networks: 192.168.10.0/24 (eth0) 192.168.11.0/24 (eth0:1) The default gateway is 192.168.10.1 iPv4 routing is already enabled and working. With vpnc I've built up an VPN connection and can access my home network... (0 Replies)
Discussion started by: tschmi
0 Replies

10. UNIX for Advanced & Expert Users

Changing single path NIC to a teamed connection in same subnet

Dear all, I have a remote CentOS7 server that has two network cards. Each card has four ports and port one of card one was defined with the IP address assigned to the server. So far, so good and it's been working for over a year. We have now got cables sorted out so there are four paths... (4 Replies)
Discussion started by: rbatte1
4 Replies
Net::Proxy::Tutorial(3pm)				User Contributed Perl Documentation				 Net::Proxy::Tutorial(3pm)

NAME
Net::Proxy::Tutorial - Network proxies for fun and profit SYNOPSIS
This document describes in detail how to use "Net::Proxy" in several real-life situations. DEFINITIONS
What is a proxy? You need a proxy every time you need to cross network boundaries to reach a service that is not directly accessible. The typical example is the corporate web proxy in a company. The corporate firewall is a boundary, usually very tightly closed, between the corporate network and the outside world (wild wild Internet). To let the employees access all the nice web sites outside, the company sets up a web proxy, which is authorised to cross the boundary (firewall) on your behalf. The web browser asks the proxy for whatever it needs, and the proxy goes and fetches the requested stuff on the web. Since the proxy sees the client requests, it can check if they fit the corporate browsing policy and decide if it will fetch the document for the requestor. It can also request authentication, and log the username with the request. Transparent proxies mimic the actual service you asked for, and reply as if they were the actual service provider. Except that the client doesn't notice there is a proxy in between. Most transparent web proxies grab outgoing traffic on port 80. Some ISP do this to cache responses and spare their bandwidth. Why do I need a proxy? Sometimes, the traffic you want to send or receive doesn't quite fit the model that the network designers had in mind. For example, if you need to modify network traffic, almost transparently, at a high level, you probably need "Net::Proxy". DESCRIPTION
In this section, we will see actual examples of use of "Net::Proxy". A basic "Net::Proxy" script Most "Net::Proxy" based scripts look like the following: o The usual boilerplate: #!perl use strict; use warnings; use Net::Proxy; o One or more proxies are created by calling "new()" with the appropriate parameters: my $proxy = Net::Proxy->new( ... ); o The individual proxies are registered with the "Net::Proxy" framework: $proxy->register(); o Some framework options are defined: Net::Proxy->set_verbosity(1); Note: The "set_verbosity()" method is available only since "Net::Proxy" version 0.04. o The framework is started, sets up the listening sockets, and waits for connections to proxy around: Net::Proxy->mainloop(); The concepts behind "Net::Proxy" Any time a proxy handles a network connection, it actually manages two connections: a connection from the client to the proxy, and a connection from the proxy to the server. During normal processing, each chunk of data received on one connection is copied to the other connection, and vice-versa. "Net::Proxy" introduces the concept of "connectors". Connectors are used to represent the ends of the two connections that the proxy handles to create a single client-server connection. +-------+ | proxy | | | "client" --->(xx)[in] [out]---> "server" +-------+ In the above ASCII diagram, "(xx)" represents the listening port number, and "[in]" (left) and "[out]" (right) the "Net::Proxy" connectors. The "in" connector accepts incoming connections on a listening port. Once a connection with the client is established, the proxy uses the "out" connector to connect to the destination server. The simplest connector is named "Net::Proxy::Connector::tcp" (we'll use "tcp" for short). When placed on the "in" side, it simply "listen()"s for incoming connections and them "accept()"s them. Then the "out" connector "connect()"s to the server. Each connector accepts different parameters, which we'll see in the following examples. Since the proxy must handle every item of data going through, it can look at it, and modify it. This is what other connectors do: they can insert or transform data on the fly, which provides us with an incredible amount of power on our network connections, which we will leverage throughout this document. REAL-LIFE EXAMPLES Contacting a SSH server through the corporate web proxy (This example requires at least "Net::Proxy" version 0.02 to work.) In many companies, the corporate firewall doesn't let you connect outside with SSH. The only allowed access to the outside is via the web proxy. Luckily, web proxies are designed to let certain types of TCP connection go through them without modifications: encrypted SSL connections, used in HTTPS. These connections are handled in the following way: the client sends a "CONNECT" connect to the proxy which (according to a policy based on the hostname, port and the user's credentials) actually connects to the remote host and transfers the data between the client and server, without looking at the encrypted data. The proxy doesn't even check that the traffic is actual SSL traffic. So your SSH client could connect to a local proxy, which would send the "CONNECT" request to the web proxy, asking for a connection to your home SSH server. Thereafter, the local proxy would behave like a standard TCP proxy and simply pass the data around. Here is a network diagram showing the network configuration in ASCII-art: ' (internal network) ' (Internet) ' +-------+ +-------+ ' +-------+ | local | | web | ' | ssh | ssh | proxy | | proxy | ' | server| client --->(22)[tcp] | | | ' | | |[connect]-->(8080) |----'--->(22) | +-------+ +-------+ ' +-------+ ' ' Here's how to set up the local "Net::Proxy" instance: Net::Proxy->new( in => { type => 'tcp', host => 'localhost', port => 22, }, out => { type => 'connect', host => 'home.example.com', port => 22, # proxy details proxy_host => 'proxy.mycompany.com', proxy_port => 8080, # proxy credentials proxy_user => 'me', proxy_pass => 's3kr3t', }, )->register(); Most of the time, corporate web proxies do not allow connections on other ports than 443, the standard HTTPS port. You just need to reconfigure your SSH server so that it also listens on port 443: # sshd configuration file Port 22 Port 443 In the exemple above, you need to change the "out"/"port" from 22 to 443. Many SSH clients (like PuTTY) already include configuration options to get through web proxies, so "Net::Proxy" probably isn't necessary any longer to handle this kind of traffic. Running two services on the same TCP port (This example requires at least "Net::Proxy" version 0.03 to work.) So you managed to get out of your corporate prison^Wnetwork by setting up your SSH server to listen on port 443. The problem is that you also run a HTTPS server; and if you want it to be accessible to anyone, it must run on port 443 (otherwise the corporate proxy won't let you pass through, and noone will find it anyway). Therefore, the only option is to run both the SSL web server and the SSH server on the same port. How is that even possible? TCP clearly doesn't allow this (or we wouldn't need those long services files in our /etc directories). What you need is a proxy that can guess what the client wants, but without contacting the server. If it manages to find out which server the client wants to connect to, it can then contact the expected server and do its usual proxy job. Luckily, there is a fundamental difference of behaviour between a http/s client and a SSH client: o during a HTTP(S) connection, the client "speaks" first o during a SSH connection, the server sends a banner first ' (Internet) ' (internal network) ' ' +-------+ ' |reverse| ' | proxy | SSL client ---'--->( | [tcp]---> SSL server ' ((443)[dual] | SSH client ---'--->( | [tcp]---> SSH server ' +-------+ ' "Net::Proxy"'s "dual" connector is able to detect between two such clients with the help of a timeout. Net::Proxy->new( { in => { type => 'dual', host => '0.0.0.0', port => 443, client_first => { type => 'tcp', port => 444, # move the https server to another port }, server_first => { type => 'tcp', port => 22, # good old SSH }, # wait during a 2 second timeout timeout => 2, }, out => { type => 'dummy' }, } )->register(); Hiding SSH connections going through the corporate proxy from IDS (This example requires at least "Net::Proxy" version 0.06 to work.) The first technique we presented (using a CONNECT request to get out of the corporate network) is so well-known that many Intrusion Detection Systems (IDS) check the first packets of a connection to try and find hidden SSH connections crossing the corporate boundaries outwards. The server banner looks like this: SSH-2.0-OpenSSH_3.9p1 while the client banner may look like this: SSH-2.0-OpenSSH_4.2p1 Debian-5 You want to deceive Intrusion Detection Systems (IDS) by modifying the cleartext part of your SSH connection. Since the detection code simply looks for the ""SSH-"" string, an "encryption" scheme as simple as ROT-13 is enough. ' (internal network) ' (Internet) ' +-------+ +-------+ ' +-------+ | local | | web | ' |reverse| ssh | proxy | | proxy | ' | proxy | client --->(22)[tcp] | | | ' | | |[connect]===>(8080) |===='===>(443)[tcp][tcp]---> ssh +-------+ +-------+ ' +-------+ server ' Traffic \________ ________/' ---> ssh v ' ===> ssh + rot13 Traffic scanned ' by the IDS ' ' The "hook" connector option accepts a callback that will be called for each chunk of data received, before sending it out. The callback must have the following signature: # Net::Proxy versions 0.06 and 0.07 sub { my ( $dataref, $connector ) = @_; ... } # As from Net::Proxy version 0.08 sub { my ( $dataref, $socket, $connector ) = @_; ... } The ROT-13 routine is straightforward (and must be defined in both scripts): my $rot13 = sub { ${ $_[0] } =~ y/A-Za-z/N-ZA-Mn-za-m/ }; Client-side proxy: Net::Proxy->new( { in => { type => 'tcp', host => '0.0.0.0', port => 22, hook => $rot13 }, out => { type => 'connect', host => 'home.example.com', port => 22, hook => $rot13, # proxy configuration proxy_host => 'proxy.mycompany.com', proxy_port => 8080, # proxy credentials proxy_user => 'me', proxy_pass => 's3kr3t', }, } )->register(); Server-side proxy: Net::Proxy->new( { in => { type => 'tcp', host => '0.0.0.0', port => 443, hook => $rot13 }, out => { type => 'tcp', port => 22, hook => $rot13 } } )->register(); Hiding a SSH connection under SSL through a corporate proxy (This example requires at least "Net::Proxy" version 0.08 to work.) Another option to hide what you are doing in your connection through the corporate proxy, is to actually use SSL to connect to your SSH server (a la stunnel). This is what the proxy expects, after all. ' (internal network) ' (Internet) ' +-----------+ +-------+ ' +-------+ | local | | web | ' |reverse| ssh | proxy | | proxy | ' | proxy | client -->(22)[tcp] | | | ' | | |[connect_ssl]===>(8080) |==='==>(443)[ssl][tcp]---> ssh +-----------+ +-------+ ' +-------+ server ' Traffic \_______ _______/' ---> ssh v ' ===> ssh over SSL Traffic scanned ' by the IDS ' ' Client-side proxy: Net::Proxy->new( { in => { type => 'tcp', host => '0.0.0.0', port => 22, }, out => { type => 'connect_ssl', host => 'home.example.com', port => 443, # proxy configuration proxy_host => 'proxy.mycompany.com', proxy_port => 8080, # proxy credentials proxy_user => 'me', proxy_pass => 's3kr3t', }, } )->register(); Server-side proxy: Net::Proxy->new( { in => { type => 'ssl', host => '0.0.0.0', port => 443, }, out => { type => 'tcp', port => 22, } } )->register(); AUTHOR
Philippe "BooK" Bruhat, "<book@cpan.org>". COPYRIGHT
Copyright 2006-2007 Philippe 'BooK' Bruhat, All Rights Reserved. LICENSE
This tutorial is distributed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 License. perl v5.10.1 2009-10-18 Net::Proxy::Tutorial(3pm)
All times are GMT -4. The time now is 02:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy