8 sub ethernet_bridge_to {
11 die "you need to run this as root\n" unless $UID == 0;
13 warn "# reset local IP address";
14 system "ifconfig virtual 172.16.10.$id";
16 warn "# connect to $host";
17 my $ssh = Net::OpenSSH->new( $host,
18 master_opts => [ -w => "$id:$id", -o => 'Tunnel=ethernet' ],
21 foreach my $command ( "ifconfig tap$id up", "brctl addif virtual tap$id" ) {
24 $ssh->system( $command ) or die "$command ", $ssh->error;
27 warn "press enter to close tunnel to $host from $id";