markturnip
January 18th, 2011, 12:02 PM
Hello, I had previously been sharing my ethernet connection over wireless using Hostapd & dnsmasq on my headless server as this tutorial shows: here (http://ubuntuforums.org/showthread.php?t=716192) which had been working fine.
I now wish to share my USB mobile broadband over the wireless. I using a ZTE MF112.
I was able to get the connection working using the application wvdial.
- Firstly I had to create a hard link between /dev/gsmodem & /dev/modem
- wvdial then made a new connection ppp0 which would work for internet access.
Changing the interfaces to have the br0 port like so:
iface br0 inet static
address 192.168.1.1
network 192.168.1.0
netmask 255.255.255.0
broadcast 192.168.1.255
bridge-ports eth1 ppp0 wlan0
Flushing the IPTables & then adding:
iptables -A FORWARD -i br0 -s 192.168.1.0/255.255.255.0 -j ACCEPT
iptables -A FORWARD -i ppp0 -d 192.168.1.0/255.255.255.0 -j ACCEPT
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
Doing so works fine, but I'm not entirely sure how to make this all automated. I could try making a script to launch, but I don't have a huge amount of experience writing scripts.
I wonder if anyone can offer a better solution? Is wvdial the best application to use?
Keeping in mind I'm using a headless server.
One note: I use Squeezebox server & the scrobbling didn't seem to be able to connect to last.fm. Do I need to specify which connection Squeezebox uses?
Any advice is really appreciated!
MT
I now wish to share my USB mobile broadband over the wireless. I using a ZTE MF112.
I was able to get the connection working using the application wvdial.
- Firstly I had to create a hard link between /dev/gsmodem & /dev/modem
- wvdial then made a new connection ppp0 which would work for internet access.
Changing the interfaces to have the br0 port like so:
iface br0 inet static
address 192.168.1.1
network 192.168.1.0
netmask 255.255.255.0
broadcast 192.168.1.255
bridge-ports eth1 ppp0 wlan0
Flushing the IPTables & then adding:
iptables -A FORWARD -i br0 -s 192.168.1.0/255.255.255.0 -j ACCEPT
iptables -A FORWARD -i ppp0 -d 192.168.1.0/255.255.255.0 -j ACCEPT
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
Doing so works fine, but I'm not entirely sure how to make this all automated. I could try making a script to launch, but I don't have a huge amount of experience writing scripts.
I wonder if anyone can offer a better solution? Is wvdial the best application to use?
Keeping in mind I'm using a headless server.
One note: I use Squeezebox server & the scrobbling didn't seem to be able to connect to last.fm. Do I need to specify which connection Squeezebox uses?
Any advice is really appreciated!
MT