Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Mohammad Shakir <shakirz1@yahoo.com>
To: netfilter@lists.netfilter.org
Subject: Help in IPTABLES
Date: Fri, 10 Jan 2003 21:46:56 -0800 (PST)	[thread overview]
Message-ID: <20030111054656.20063.qmail@web40711.mail.yahoo.com> (raw)

Dear Friends,

I have Installed Red Hat Linux 7.3 with hostname
SERVER1 ipaddress 192.168.0.1 and also configure
squid, DHCP, DNS services all are running well. I have
also 30 PCs of windows 98 as a client with auto ip and
set their gateway,dns,dhcpserver and so on from DHCP
192.168.0.1.
Now I want that any request for browsing come from
client automatically forward to my squid which is
running on 3128 port and all others request go on
direct ppp0 for this I configured one script which is
given below.

Is this script correct or not ?

echo 1 > /proc/sys/net/ipv4/ip_forward
/sbin/iptables --flush
/sbin/iptables --table nat --flush
/sbin/iptables --delete-chain
/sbin/iptables --table nat --delete-chain

/sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp
--dport 80 -j REDIRECT --to-port 3128
/sbin/iptables --table nat --append POSTROUTING -s
192.168.0.1/24 --out-interface ppp0 -j MASQUERADE
/sbin/iptables --append FORWARD --in-interface eth0 -j
ACCEPT

This is other setup. 

I have setup two servers hostname server1 ip address
192.168.0.1 and hostname server2 ipaddress 192.168.0.2
both servers are connected with dialup sepratly and
also configure squid, DHCP, DNS services. I have also
100 PCs of windows 98 as a client with auto ip and set
their gateway,dns,dhcpserver and so on from DHCP
192.168.0.1. 

Now I want that any request for browsing come from
client automatically forward to my squid which is
running on 3128 port on server 192.168.0.2 and all
others request go on direct ppp0 of 192.168.0.1.
Please help my what script I make for this.

I hope you will help me in this regard.

Thanks

MOHAMMAD SHAKIR


___________________________________________________________
Sent by ePrompter, the premier email notification
software.
Free download at http://www.ePrompter.com.

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com


             reply	other threads:[~2003-01-11  5:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-11  5:46 Mohammad Shakir [this message]
2003-01-11  6:41 ` Help in IPTABLES hare ram
2003-01-11  7:57 ` Arnt Karlsen
2003-01-12  2:32   ` Joel Newkirk
2003-01-12  8:01     ` Arnt Karlsen
2003-01-13 20:30       ` Joel Newkirk
2003-01-14  4:33         ` Andrew Smith
2003-01-11  8:31 ` Joel Newkirk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030111054656.20063.qmail@web40711.mail.yahoo.com \
    --to=shakirz1@yahoo.com \
    --cc=netfilter@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox