Dear Prashant Thanks for your suggestion
I have used ipchains in linux 6.2 box with kernel 2.2 currently I don't know how to implement 1 to 1 communication using RH 9 with iptables basically my purpose is my complete network will access the internet using proxy server and only one machine can access only one external domain using router with all protocol's and ports at system level squid proxy running on single port it is to interact with IE or similar web browsers only I need to connect one system from my network to external system using remote desktop connection for this type of communication my network required one router. I have only one broad band connection that I want to share using RH router or Squid proxy. But I don't know the iptables chains and commands I have gone through the iptables manual but it will require lot of time to implement that I will do it later Swapnil K. [EMAIL PROTECTED] ----- Original Message ----- From: "Prashant Verma" <[EMAIL PROTECTED]> To: "SWAPNIL" <[EMAIL PROTECTED]>; "The Linux-Delhi mailing list" <[email protected]> Sent: Tuesday, July 19, 2005 10:41 AM Subject: Re: [ilugd] iptables implementation > --- SWAPNIL <[EMAIL PROTECTED]> wrote: > > > Dear All, > > > > I have just install RH 9.0 as proxy server and mail > > server for our network > > > > now i need implement iptables in my RH 9 system for > > using as router > > > > before this i am using ipchains in RH 6.2 > > > > ipchains -A forward -s 192.168.1.1 -d > > www.mydomain.com -j MASQ > > > > i want command for iptables with same effect of > > above command in ipchains > > Swapnil, > > Here is a "cheatsheet" that I had created for sharing > internet connections using iptables. I hope this will > help you. There's also an iptables tutorial link down > there in the cheatsheet somewhere... > > Problem statement: You have a Linux machine connected > to the internet > via a DSL connection. You also have another PC at > home (a WinXP PC > for the purpose of this cheatsheet). You want that PC > to share the > internet connection with your Linux machine. Please > note that whenever > I say "Linux", I really mean Fedora Core 3 and I have > tried these > steps with Fedora Core 3. The steps should work with > other distros as > well. > > Solution: > Step 1: Buy (or otherwise acquire) a network card and > fit it into the > PCI slot of your Linux Machine. > > Step 2: Boot your Linux machine and let the hardware > detection program > (Kudzu) detect your card and install the drivers for > it. > > Step 3: Buy a 'switch' or a 'hub'. Connect the new > network card on > your Linux machine to the hub. Also connect your other > computer to the > hub. > > Alternative Step 3: Don't use a switch. Instead, use a > 'crossover > cable' to connect the new network card on your Linux > machine with the > network card on your WinXP machine. This is useful if > you only have > one other computer that you want to connect to the > internet. I have > not tried this, but I believe this will work. I still > recommend going > with a switch. > > Step 4: FC3 will have configured your new network card > as 'eth1'. Use > the following command to configure eth1: > ifconfig eth1 192.168.0.1 netmask 255.255.255.0 > > Step 5: Configure your windows machine as follows: > IP Address: 192.168.0.2 > NetMask: 255.255.255.0 > Gateway: 192.168.0.1 (your Linux Machine) > > If you add another machine to the hub/switch, you can > assign it the IP > address 192.168.0.3 and so on. > > Step 6: Make sure you can 'ping' from one machine to > the other. > > Step 7: Configure IP forwarding on your Linux Machine > using the > following commands: > iptables --flush > > iptables --table nat --flush > iptables --delete-chain > > iptables --table nat --delete-chain > > # Set up IP FORWARDing and Masquerading > iptables --table nat --append POSTROUTING > --out-interface ppp0 -j MASQUERADE > iptables --append FORWARD --in-interface eth1 -j > ACCEPT - > Assuming one NIC to local LAN > > echo 1 > /proc/sys/net/ipv4/ip_forward > > (Please > refer:http://www.yolinux.com/TUTORIALS/LinuxTutorialIptablesNetworkGateway.h tml) > > Step 8: Configure DNS on your Windows machine. Run the > following > command on your Linux machine: > cat /etc/resolv.conf > >From the output of the entries, pick out the > 'nameserver' entries and > specify these entries in the network configuration box > on your windows > machine. > > Step 9: Run internet explore on your windows machine > and browse the web :-) > > > Thanks, > Prashant Verma > http://www.saltlakesoft.com ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ linux-india-help mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-india-help
