Advertisement
Guest User

Wireless Ad-Hoc Mobile Broadband Sharing in Ubuntu

a guest
Mar 9th, 2012
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. *********************************************
  2. * CREATE A WIRELESS AD-HOC NETWORK TO SHARE *
  3. * YOUR MOBILE BROADBAND INTERNET CONNECTION *
  4. * IN UBUNTU *
  5. *********************************************
  6.  
  7. 01. Connect to your mobile broadband using
  8. NetworkManager (NM).
  9. 02. Click on the NM icon and choose 'Create
  10. New Wireless Network'.
  11. 03. Enter the desired details for the network
  12. and click 'Create'.
  13. 04. Right-click on the NM icon and select
  14. 'Edit Connections'.
  15. 05. Go to the 'Wireless' tab and double-click
  16. on the created network.
  17. 06. Head over to 'IPv4 Settings' tab.
  18. a. Click 'Add' under 'Addresses'.
  19. b. Fill:
  20. Address: 192.168.133.1
  21. Netmask: 255.255.255.0
  22. Gateway: 0.0.0.0 (or leave blank)
  23. DNS Server: 8.8.4.4,8.8.8.8
  24. c. Click 'Save'.
  25. d. Click 'Close'.
  26. 07. Open Terminal and enter these four lines:
  27. sudo iptables -A FORWARD -i ppp0 -o wlan0 -s 192.168.133.1/24 -m conntrack --ctstate NEW -j ACCEPT
  28. sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
  29. sudo iptables -A POSTROUTING -t nat -j MASQUERADE
  30. sudo echo 1 > /proc/sys/net/ipv4/ip_forward
  31.  
  32. ************************
  33. * SETTINGS FOR CLIENTS *
  34. ************************
  35.  
  36. Network Name (SSID): YOURADHOCNETWORKNAME
  37. IP Address: 192.168.133.[2-254]
  38. Netmask: 255.255.255.0
  39. Gateway: 192.168.133.1
  40. DNS Servers: 8.8.4.4
  41. 8.8.8.8
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement