Quote:
Originally Posted by deepak rawat
i have one pc which have two lan card in it eth0 and eth1
eth0 hav address like
ip address>>>>>>>>> 202.0.0.100
netmask >>>>>>>>> 255.255.255.0
primary DNS >>>>>>> 202.54.15.30
secondary dns >>>>> 203.192.12.42
and the eth1 which is conncted to router hav address
ip address >>>>> 192.168.1.2
netmask >>>>>> 255.255.255.0
gateway >>>>>> 192.168.1.1
PRimary DNS and secondary dns is same to tht of eth0
now what i want is to set the squid proxy server for my private lan which is on ip range 202.0.0.1 to 202.0.0.200
i hav given the entry like this is squid.conf
acl mynetwork src 202.0.0.0/24
http_access allow mynetwork
on the server pc internet is working but on the client i hav change the connection settings to proxy server>>>> 202.0.0.100 and port number to 3128
and still its not working and the reason for that is eth1 ip is 192.168.1.2 but my lan address is 202.0.0.1 to 202.0.0.200 according to my knowledge to solve this problem we need NAT(network address translation) but i am not confortable with iptables
so if anyone here solve this problem
one thing make sure that i want this by squid proxy .
thanks
|
OK I'm a little confused about how you have setup this router, you have eth0 as 202.x.x.x, is this allocated by your ISP or do you have this router inside your network and your a making another subnet from your Local network?
If this is a subnet inside your local network you cannot use 202.x.x.x ipaddress, this is a public allocated class C network address, you must use private ipaddresses only. If you don't this can have
DNS issues which will be nothing but headaches.
What happens with networking by default is if there is an ipaddress destination that is not of the same network ID it will be forwared to the default gateway and then let the next network process the packet.
It would be best to change it to something like 192.168.2.1, and if you wont the packet to be able to return to the network without using NAT, you will need to add a route to the routing table of the router that is at the front of your network.
This will usually be the modem that your ISP provides, you will need to tell it to send all packets destined for the 192.168.2.x network goes through the 192.168.1.2 gateway.
Sorry if this is not much help.