Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cannot make IPCHAINS work for me...

Status
Not open for further replies.

rdkoli

Programmer
Oct 26, 1999
9
IN
<br><br>I have successfully created a DHCP server, which assigns an IP to its<br>client. My ping results from client to server (ping server) work<br>perfect, whereas when i ping frm server (ping node1) it says &quot;unknown<br>host&quot;, but when i ping with the IP assigned to the client i get the<br>result.<br><br>Now i wish to share my net connections, att r the listings of my files.<br>Pls let me know where i m doing wrong.<br><br>My netcfg shows:<br>Names<br>-----<br>Hostnames=server.myindia.com<br>Domain = myindia.com<br>Nameservers =&nbsp;&nbsp;&nbsp;202.54.1.30<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;202.54.1.116<br><br>Hosts<br>-----<br>IP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NickNames<br>127.0.0.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;localhost.localdomain&nbsp;&nbsp;&nbsp;localhost<br>192.168.0.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;server.myindia.com&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;server<br><br>Interfaces<br>----------<br>lo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;127.0.0.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;none&nbsp;&nbsp;&nbsp;&nbsp;yes&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;active<br>eth0&nbsp;&nbsp;&nbsp;&nbsp;192.168.0.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;none&nbsp;&nbsp;&nbsp;&nbsp;yes&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;active<br>ppp0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;none&nbsp;&nbsp;&nbsp;&nbsp;no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inactive<br><br><br><br><br><br>NETWORKING=yes<br>HOSTNAME=server1.myindia.com<br>GATEWAY=<br>GATEWAYDEV=<br>FORWARD_IPV4=yes<br><br><br><br><br>#!/bin/sh<br>echo &quot;1&quot; &gt; /proc/sys/net/ipv4/ip_forward<br>echo &quot;1&quot; &gt; /proc/sys/net/ipv4/ip_dynaddr<br>/sbin/ipchains -F<br>/sbin/ipchains -P forward DENY<br>/sbin/ipchains -A forward -s 255.255.255.255<br>255.255.255.0<br>192.168.0.0/255.255.255.0 -j MASQ<br>/sbin/ipchains -L<br><br><br><br><br>#!/bin/sh<br>#<br># This script will be executed *after* all the other init scripts.<br># You can put your own initialization stuff in here if you don't<br># want to do the full Sys V style init stuff.<br><br>if [ -f /etc/redhat-release ]; then<br>&nbsp;&nbsp;&nbsp;&nbsp;R=$(cat /etc/redhat-release)<br><br>&nbsp;&nbsp;&nbsp;&nbsp;arch=$(uname -m)<br>&nbsp;&nbsp;&nbsp;&nbsp;a=&quot;a&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;case &quot;_$arch&quot; in<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_a*) a=&quot;an&quot;;;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_i*) a=&quot;an&quot;;;<br>&nbsp;&nbsp;&nbsp;&nbsp;esac<br><br>&nbsp;&nbsp;&nbsp;&nbsp;NUMPROC=`egrep -c &quot;^cpu[0-9]+&quot; /proc/stat`<br>&nbsp;&nbsp;&nbsp;&nbsp;if [ &quot;$NUMPROC&quot; -gt &quot;1&quot; ]; then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SMP=&quot;$NUMPROC-processor &quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if [ &quot;$NUMPROC&quot; = &quot;8&quot; -o &quot;$NUMPROC&quot; = &quot;11&quot; ]; then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a=&quot;an&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a=&quot;a&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fi<br>&nbsp;&nbsp;&nbsp;&nbsp;fi<br><br>&nbsp;&nbsp;&nbsp;&nbsp;# This will overwrite /etc/issue at every boot.&nbsp;&nbsp;So, make any<br>changes you<br>&nbsp;&nbsp;&nbsp;&nbsp;# want to make to /etc/issue here or you will lose them when you<br>reboot.<br>&nbsp;&nbsp;&nbsp;&nbsp;echo &quot;&quot; &gt; /etc/issue<br>&nbsp;&nbsp;&nbsp;&nbsp;echo &quot;$R&quot; &gt;&gt; /etc/issue<br>&nbsp;&nbsp;&nbsp;&nbsp;echo &quot;Kernel $(uname -r) on $a $SMP$(uname -m)&quot; &gt;&gt; /etc/issue<br><br>&nbsp;&nbsp;&nbsp;&nbsp;cp -f /etc/issue /etc/issue.net<br>&nbsp;&nbsp;&nbsp;&nbsp;echo &gt;&gt; /etc/issue<br>fi<br><br>/sbin/route add -host 255.255.255.0 dev eth0<br><br>/sbin/modprobe ip_masq_autofw<br>/sbin/modprobe ip_masq_cuseeme<br>/sbin/modprobe ip_masq_ftp<br>/sbin/modprobe ip_masq_irc<br>/sbin/modprobe ip_masq_mfw<br>/sbin/modprobe ip_masq_portfw<br>/sbin/modprobe ip_masq_quake<br>/sbin/modprobe ip_masq_raudio<br>/sbin/modprobe ip_masq_user<br>/sbin/modprobe ip_masq_vdolive<br>/etc/rc.d/rc.fw<br><br><br><br><br><br>search myindia.com<br>nameserver 202.54.1.30<br>nameserver 202.54.4.116<br><br><br>
 
The dhcp server has to advise the server of new cliients.<br>normally have them all listed in the /etc/hosts.<br>Or your internal DNS if you have one. <p> Tony ... aka chgwhat<br><a href=mailto:tony_b@technologist.com>tony_b@technologist.com</a><br><a href= > </a><br>When in doubt,,, Power out...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top