November 14, 2018, 02:25:36 AM

News : Linux Help Community Forum..

Author Topic: gateway problem  (Read 2121 times)

Offline ranadastidar

  • Linux Noob !
  • *
  • Posts: 5
gateway problem
« on: August 25, 2009, 09:08:48 AM »
In our office network we are using squid proxy as our proxy server. Earlier we are using broadband and its was ppoe now we changed our isp and now they provide fixed ip. They provide one router and our server connected with that router. Our present network like this

eth0----- for local network -- ipaddress
eth1------for internet connected with router-- ipaddress and gateway is
i can ping the gateway from our proxy server but we cant use internet from any other machine on the network , pls help

Offline pedro

  • Linux Noob !
  • *
  • Posts: 14
Re: gateway problem
« Reply #1 on: August 30, 2009, 03:56:44 PM »
Let's see if I understood correctly. You "gateway" is the proxy server, the rest of the network has ip addresses in the 192.168.0.x range, and as their router, right?

The server should route (NAT) the requests to the internet through the ISP router ( You may only need to route web browsing through the gateway.

In any case, you need to enable ip_forwarding in the gateway, and add a few rules to the firewall configuration.

Please clarify... do you want a transparent proxy?


Offline gauravbajaj

  • LST CareTaker
  • Experienced
  • *****
  • Posts: 658
Re: gateway problem
« Reply #2 on: September 02, 2009, 04:55:12 AM »
Pedro is right. You cant use internet on other boxes unless you enable ip forwarding and NAT. You have to use some iptables rule similar like below

iptables -t nat -A POSTROUTING -s ipaddrr/netmask -j SNAT -o eth0 --to-source ipadd.

Check for it and change it acc to your needs


« Last Edit: September 03, 2009, 06:21:07 AM by gauravbajaj »