# Tunnelling

### SSH Port Forward

{% embed url="<https://sushant747.gitbooks.io/total-oscp-guide/content/port_forwarding_and_tunneling.html>" %}

#### Local Tunnel

```bash
# Example
ssh -L 8080:www.facebook.com:80 localhost

# Authenticated
ssh username@<remote-machine> -L localport:target-ip:target-port

ssh username@192.168.1.111 -L 5000:192.168.1.222:5000
```

#### Remote Tunnel

```bash
ssh -R 8080:localhost:80 public.example.com
```
