[ubuntu-in] proxyless internet connection sharing

Pritam Baral pritam at pritambaral.co.cc
Wed Jun 20 05:37:26 UTC 2012


On similar lines, I have set-up transparent proxy so that devices
connecting to my WiFi do not need to set-up proxy on their own (but will
still work if they do.) Note however, that this is an Infrastructure
Wireless network I created (much like what Connectify does on Windows.)

I have used a modified set of iptables rules for sharing internet over
Ad-Hoc WiFi network, but haven't updated it on the blog. However, here are
the commands:

sudo iptables -t nat -A PREROUTING -i wlan0 -p tcp -m tcp --dport 80 -j
DNAT --to-destination 10.42.0.1:5123
sudo iptables -t nat -A PREROUTING -i wlan0 -p tcp -m tcp --dport 443 -j
DNAT --to-destination 10.4.0.1:5124

*NB: 10.42.0.1 is the local Wireless interface address under Ad-Hoc as
created by NetWorkManager. 192.168.0.1 is the address if you follow my
previous blog posts on creating Infrastructure Wireless APs*

please note that *iptables-restore* washes away previous rules, but the two
commands above only add to iptables, not replace them (much like the
difference between > and >> in bash redirection)

http://pritambaral.com/2012/05/device-agnostic-transparent-proxy-on-wifi/

*Regards,*

*Chhatoi Pritam Baral*



On Wed, Jun 20, 2012 at 10:55 AM, Alok Singh Mahor <alokmahor at gmail.com>wrote:

> Hi all,
> I used to access internet via proxy server. (no direct connection is
> available for me)
> when I share my internet connection to other laptop one need to set proxy
> in that laptop too. (I share internet connection using network manager)
>
> I want to share my internet that can work without proxy (so there will be
> no need to set proxy on the laptop which is accessing my internet
> connection)
> please suggest me some method
> thank you
>
> --
> Alok Singh Mahor
> http://alokmahor.co.cc
> Join the next generation of computing, Open Source and Linux/GNU!!
>
>
> --
> ubuntu-in mailing list
> ubuntu-in at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-in
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-in/attachments/20120620/769e60eb/attachment.html>


More information about the ubuntu-in mailing list