December 05, 2023, 10:37:37 PM

News : Linux Help Community Forum..

Author Topic: proxy problem  (Read 3898 times)

Offline mervs00024

  • Linux Noob !
  • *
  • Posts: 5
proxy problem
« on: September 29, 2009, 06:49:59 PM »
hi everyone i am new to linux can you please help on my problem my situation is this:
i installed centos 5.2final to use it as a dhcp/proxy server
on my eth1 my ip address is which is forward to external ip
then my my eth0 configure as

here is my config of dhcpd.conf:

ddns-update-style none; # keep it simple for now
ignore client-updates;  # here too
DHCPARGS=eth0;          # tells it what interface to listen on
subnet netmask {
# --- default gateway
       option routers        ;   # gateway on your eth1 internal interface
       option subnet-mask    ; # subnet mask
       option domain-name              "";  # domain name given to client
       option domain-name-servers;  # the IP of your ISP's nameservers you're using
       option time-offset              -18000;        # Eastern Standard Time - set to what you have
       range;              # the range of IP's your clients will get
       default-lease-time 21600;                      # how long the client's will keep the same IP
       max-lease-time 43200;
then i edit my  /etc/sysconfig/network-scripts/ifcfg-eth0

the client can get an ip from my centos but it cannot go to internet.with the ip of

did i miss something on my config in dhcpd.conf?
my centos can go to internet but the client connected to eth0 cannot.

please help...
thanks in advance

Offline kaushalpatel1982

  • LST CareTaker
  • Linux Learner
  • *****
  • Posts: 87
Re: proxy problem
« Reply #1 on: September 30, 2009, 06:47:39 AM »
1. You need not require to configure gateway in /etc/sysconfig/network-scripts/ifcfg-eth0.

2. You have to enable IP Forwarding in /etc/sysctl.conf by changing line to "net.ipv4.ip_forward = 1"

3. You have to enable masquerading on your CentOS box to foword your internal traffic to WAN using following command.
 # iptables -t nat -A POSTROUTING -s eth0 -d eth1 -j MASQUERADE

4. You have not mentioned the configuration of your proxy server that are you using transparent proxy or browser proxy. I believe you have configured proxy setting in browser of your clients.

I hope these will solve your problem. Best of Luck.