tun0 is a layer 3 tunnel interface. It doesn't do layer 2 (Ethernet or whatever) at all, which means it can't be bridged.
What you can do, is route traffic through the PC with the tunnel interface. Other devices on your network would send packets to that PC, which would then forward them through the tunnel.
For that to work, you must either:
- have the PC with the VPN tunnel serve as a gateway for every other device needing to reach the remote network (or the entire network, for that matter), OR
- create a route entry for the remote network on your current gateway router, pointing to the PC with the VPN tunnel, OR
- manually create routes any device needing access to the remote network.
That will cover traffic flowing from your network to the remote network, but what about return traffic? You can't expect the router(s) at the remote end to know about your internal network, so you'd also have to configure NAT on the PC with the tunnel interface.
The following
iptables command will "hide" (NAT) all outgoing traffic behind the address of the tunnel interface:
Code:
iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE