Set proxy while sharing internet from dnsmasq server

1

I have a raspberry pi from which I am sharing internet to other hosts connected to it.

Raspberry pi has internet connection on "wlan0" and other hosts are connected to "eth0". I have installed dnsmasq on raspberry pi, so that it can assign ip address to the connected hosts. ip-tables setup is also complete.

As of now, the hosts connected to raspberry pi get able to access the internet.

The other hosts do not have the capability to have proxy set. So I am trying to set proxy setting (system wide) in my raspberry pi, so that the hosts connected to raspberry pi have the proxy setting implicitly set.

After setting this up, the connection from other hosts still aren't routed through the proxy sever. Is my approach fundamentally wrong or have I mis-configured something during the setup?

My iptables config

*nat
:PREROUTING ACCEPT [557:61510]
:INPUT ACCEPT [128:9240]
:OUTPUT ACCEPT [48:3631]
:POSTROUTING ACCEPT [5:335]
-A POSTROUTING -o wlan0 -j MASQUERADE
COMMIT
# Completed on Sun Mar  6 13:01:54 2016
# Generated by iptables-save v1.4.21 on Sun Mar  6 13:01:54 2016
*filter
:INPUT ACCEPT [828:67873]
:FORWARD ACCEPT [354:23106]
:OUTPUT ACCEPT [526:66184]
-A FORWARD -s 192.168.0.0/24 -i eth0 -o wlan0 -m conntrack --ctstate NEW -j ACCEPT
-A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
COMMIT

Pratyush

Posted 2016-03-07T11:28:14.007

Reputation: 11

No answers