#!/bin/bash modprobe hci_usb hciconfig hci0 up /usr/sbin/hcid modprobe rfcomm dund --listen --msdun --channel 1 10.1.1.101:10.1.1.102 echo '1' > /proc/sys/net/ipv4/ip_forward iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE iptables -A FORWARD -i ppp0 -j ACCEPT iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT