December 16, 2017, 02:47:10 PM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: proxy problem  (Read 1891 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 193.9.200.11 which is forward to external ip
then my my eth0 configure as 192.168.1.1


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 192.168.1.0 netmask 255.255.255.0 {
# --- default gateway
       option routers                  192.168.1.1;   # gateway on your eth1 internal interface
       option subnet-mask              255.255.255.0; # subnet mask
       option domain-name              "example.com";  # domain name given to client
       option domain-name-servers      193.9.200.11;  # the IP of your ISP's nameservers you're using
       option time-offset              -18000;        # Eastern Standard Time - set to what you have
       range 192.168.1.10 192.168.1.100;              # 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
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.1.1
NETMASK=255.255.255.0
GATEWAY=193.9.200.11

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

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.