Ok, so this is part two of my main question:
So I have an ssh -w ethernet tunnel established. previous question
source ./HOST scp -i green.pem server/* root@$HOST: ssh -i green.pem root@$HOST ./setup
echo 1 | tee /proc/sys/net/ipv4/ip_forward echo "PermitTunnel yes" >> /etc/ssh/sshd_config /etc/init.d/ssh restart
HOST=$1 ssh -i green.pem root@$HOST -w 0:0 -o Tunnel=ethernet -o ServerAliveInterval=60
in the server session I bring up the interface and redirect traffic over it:
# server ifconfig tap0 up ip route add 192.168.2.0/24 dev tap0
and on the client I bring up the interface and associate an ip
sudo su # client ifconfig tap0 up ifconfig tap0 192.168.2.1
I run a webserver on the client 0.0.0.0:8000
python -m SimpleHTTPServer
I can connect to it on the client with "telnet 192.168.2.1 8000"
But if I try to connect to it from the remote server with "telnet 192.168.2.1 8000"
I get no route to host.
When I try the telnet I tcpdump does show packets on the tunnel.
How do I make the 192.168.2.1 webserver on the client visible on the remote box?
Answer I did just now:
okay it turns out that packets were getting across but the responses could not make it back (I think this is what is going on)
so I added part of the internal ip of the remote machine
ip route add 10.112.38.0/24 dev tap0
on the client machine
and things seems to be working