<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>» DoYourself.org &#187; Networking</title>
	<atom:link href="http://www.doyourself.org/category/networking/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.doyourself.org</link>
	<description>Did you know ?</description>
	<lastBuildDate>Fri, 03 Feb 2012 23:00:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to Configure DNS address from the command prompt</title>
		<link>http://www.doyourself.org/uncategorized/818-how-to-configure-dns-address-from-the-command-prompt/</link>
		<comments>http://www.doyourself.org/uncategorized/818-how-to-configure-dns-address-from-the-command-prompt/#comments</comments>
		<pubDate>Thu, 16 Dec 2010 23:57:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.doyourself.org/?p=818</guid>
		<description><![CDATA[Domain Name system (DNS ) is using to assign names for a particular IP address. In Internet every communication is based on IP address. It is difficult to remember the 32 bit IP address and DNS server is resolving that issue by assigning a unique name for particular IP address. So if one user type [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Domain Name system (DNS ) is using to assign names for a particular IP  address. In Internet every communication is based on IP address. It is  difficult to remember the 32 bit IP address and DNS server is resolving  that issue by assigning a unique name for particular IP address. So if  one user type one domain name on the browser the communication is like  this.</p>
<p>Web browser&#8212;&#8212;-&gt; DNS Server</p>
<p>DNS server &#8212;&#8212;&#8212;&gt; Web server</p>
<p>The  name to IP address conversion is also done in DNS server and it is very  important that every computer should know the address of DNS server. So  we need to set DNS address on every computer for the proper Internet  communication.</p>
<h2>How to set DNS(Domain Name System) from DOS prompt using single command</h2>
<p>We can set DNS address for a computer from the command  promptby a single command. The command to set DNS for a computer is:</p>
<p>netsh interface ip set dns &#8220;Local Area Connection&#8221; static 192.168.1.50</p>
<p>Where the interface is Local Area Connection</p>
<p>The IP address is 192.168.1.50</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doyourself.org/uncategorized/818-how-to-configure-dns-address-from-the-command-prompt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is Google Public DNS and how to configure it on your computer</title>
		<link>http://www.doyourself.org/uncategorized/816-what-is-google-public-dns-and-how-to-configure-it-on-your-computer/</link>
		<comments>http://www.doyourself.org/uncategorized/816-what-is-google-public-dns-and-how-to-configure-it-on-your-computer/#comments</comments>
		<pubDate>Thu, 16 Dec 2010 23:56:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.doyourself.org/?p=816</guid>
		<description><![CDATA[After global DNS and Open DNS we have one more choice in setting a reliable DNS services. Google introduce a new set of public DNS address called Google Public DNS which offers a high speed more secure DNS services. The addresses are: 8.8.8.8 and 8.8.4.4 [ DNS is used to covert domain name to corresponding [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>After global DNS and Open DNS we have one more choice in setting a reliable DNS services. Google introduce a new set of public DNS address called Google Public DNS which offers a high speed more secure DNS services. The addresses are:</p>
<p>8.8.8.8 and</p>
<p>8.8.4.4</p>
<p>[ DNS is used to covert domain name to corresponding IP address and vice versa. ]</p>
<p>Google has launched telephone support for the issues related to Google Public DNS service. The telephone numbers are:</p>
<p>* 877-590-4367 { For US customers }</p>
<p>* 770-200-1201 { Outside US }</p>
<p>To set Google Public DNS in your computer from command prompt click on the link below.</p>
<p><a href="http://www.doyourself.org/uncategorized/818-how-to-configure-dns-address-from-the-command-prompt/">Setup DNS address on your computer from Command Prompt</a></p>
<p>To know more about Google Public DNS service please click on the link provided below.</p>
<p>http://code.google.com/speed/public-dns/docs/using.html</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doyourself.org/uncategorized/816-what-is-google-public-dns-and-how-to-configure-it-on-your-computer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to bing dyanmic IP to a subdomain</title>
		<link>http://www.doyourself.org/networking/790-how-to-bing-dyanmic-ip-to-a-subdomain/</link>
		<comments>http://www.doyourself.org/networking/790-how-to-bing-dyanmic-ip-to-a-subdomain/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 23:43:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://www.doyourself.org/?p=790</guid>
		<description><![CDATA[We have a server with dedicated IP address in my company&#8217;s headquarter. There&#8217;re a couple of branches at other locations. We need to setup servers in each branch and allow accessing to those servers through dedicated subdomain name. But we do not have static IP for those branches, so it&#8217;s not possible to bind any [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>We have a server with dedicated IP address in my company&#8217;s headquarter.  There&#8217;re a couple of branches at other locations. We need to setup  servers in each branch and allow accessing to those servers through  dedicated subdomain name. But we do not have static IP for those  branches, so it&#8217;s not possible to bind any IP in our DNS server at  headquarter.</p>
<p>If you have the same need as we are, here&#8217;s what we did to resolve the problem.</p>
<p>Basically  we need to setup DNS Update service at branch site to perform remote  DNS update to headquarter to update IP of subdomains used by branch site  periodically, so headquarter&#8217;s DNS will always know the correct IP of  each branch server.</p>
<p>For example, our main domain is  infolexllc.com, and we need to setup a branch server at New York which  will be called ny.infolexllc.com, here&#8217;s what we do at servers at both  ends (both CentOS 5.X):</p>
<p>At branch site(where only dynamic IP is available):<br />
1. Install NS Update:</p>
<pre>yum install bind-utils</pre>
<p>2. Create folder to hold related files and scripts:</p>
<pre>mkdir /root/nsupdate
cd /root/nsupdate</pre>
<p>3. create key files for NS update</p>
<pre>dnssec-keygen -a HMAC-MD5 -b 512 -n USER ny.infolexllc.com
Kny.infolexllc.com.+157+47223</pre>
<p>4. You should have two new files created under the current folder:</p>
<pre>Kny.infolexllc.com.+157+47223.key  Kny.infolexllc.com.+157+47223.private
5. create a new shell file: donsupdate.sh:
<div id="codeContent">
<ol>
<li>#!/bin/sh</li>
<li></li>
<li>cd /root/nsupdate</li>
<li></li>
<li>HOST=ny.infolexllc.com.</li>
<li></li>
<li>#Get branch site's IP</li>
<li></li>
<li>IPADDR=`links -source http://whatismyipaddress.com/ |grep -o 'Your IP address is [0-9.]*'|cut -d : -f 2|awk '{print $5}'`</li>
<li>NSUFILE=./nsupdate</li>
<li>FLAGFILE=./nsupdate.flag</li>
<li></li>
<li>if [ "" = "$IPADDR" ]; then</li>
<li> echo Error detecting current  I will exit.</li>
<li> exit 0;</li>
<li>else</li>
<li> echo Detected IP address is:$IPADDR</li>
<li>fi</li>
<li></li>
<li>FLAG=`date +%H`:$IPADDR</li>
<li></li>
<li>if [ -a $FLAGFILE ]; then</li>
<li> FLAG_IN_FILE=`cat $FLAGFILE`</li>
<li>fi</li>
<li></li>
<li>if [ "$FLAG" == "$FLAG_IN_FILE" ]; then</li>
<li> #Flag is same, skip it</li>
<li></li>
<li> echo IP is not changed in the passwd hour, so I will skip</li>
<li> exit 0;</li>
<li>else</li>
<li> echo IP has been changed or one hour has been passed, save the flag and do update...</li>
<li> echo $FLAG &gt; $FLAGFILE</li>
<li>fi</li>
<li></li>
<li>#change infolexllc.com to your head quarter site's domain name</li>
<li></li>
<li>HQ_DOMAIN_NAME=infolexllc.com</li>
<li>echo "server $HQ_DOMAIN_NAME" &gt; $NSUFILE</li>
<li>echo "zone infolexllc.com" &gt;&gt; $NSUFILE</li>
<li>echo "update delete $HOST A" &gt;&gt; $NSUFILE</li>
<li>echo "update add $HOST 84600 A $IPADDR" &gt;&gt; $NSUFILE</li>
<li>echo "show" &gt;&gt; $NSUFILE</li>
<li>echo "send" &gt;&gt; $NSUFILE</li>
<li>nsupdate -k ./Kny.infolexllc.com.+157+47223.private -d $NSUFILE</li>
</ol>

Make sure you change value of the script based-on your own environment.
6. Open the newly generated key file Kny.infolexllc.com.+157+47223.key
<pre>ny.infolexllc.com. IN KEY 0 3 157 QLwMCWdqUJ/ZOsOsdF4Dj/mYD2XwmqSrPL540JE3dwG7FXZwrJulOp16 Y0SySnfOo7+5s1mhZhUiAHxVOSoXnQ==</pre>
<p>Remember the key string started from QlwMC.. all the way to the ending ==<br />
<span style="font-weight: bold;"><br />
On headquarter server:</span><br />
7. Modify named comnfiguration to allow remote DNS update from ny.infolexllc.com</p>
<p>Open /etc/named.conf<br />
Find zone "infolexllc.com" {<br />
Insert the following section in the configuration file before the zone:<br />
key ny.infolexllc.com.{<br />
algorithm hmac-md5;<br />
secret "QLwMCWdqUJ/ZOsOsdF4Dj/mYD2XwmqSrPL540JE3dwG7FXZwrJulOp16 Y0SySnfOo7+5s1mhZhUiAHxVOSoXnQ==";<br />
};</p>
<p>Insert the following lines at end of the infolexllc.com zone:<br />
allow-update {<br />
key  ny.infolexllc.com. ;<br />
};</p>
<p>Restart DNS server:</p>
<pre>/etc/init.d/named restart</pre>
<p>Now the headquarter DNS server should allow remote DNS update from ny.infolexllc.com</p>
<p><span style="font-weight: bold;">On branch server:</span><br />
8. Test DNS update script:<br />
run</p>
<pre>donsupdate.sh</pre>
<p>You should see messages like below:</p>
<pre>
Detected IP address is:123.123.123.123
IP has been changed or one hour has been passed, save the flag and do update...
Creating key...
before getaddrinfo()
Outgoing update query:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: UPDATE, status: NOERROR, id:      0
;; flags: ; ZONE: 0, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0
;; UPDATE SECTION:
ny.infolexllc.com. 0 ANY A
ny.infolexllc.com. 84600 IN A 123.123.123.123

Reply from update query:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: UPDATE, status: NOERROR, id:  25321
;; flags: qr ; ZONE: 0, PREREQ: 0, UPDATE: 0, ADDITIONAL: 1
;; TSIG PSEUDOSECTION:
ny.infolexllc.com. 0 ANY TSIG hmac-md5.sig-alg.reg.int. 123123123123 300 16 ABCabcABCabc123+12aBcde== 25321 NOERROR 0
</pre>
<p>The status: NOERROR indicates a succeful update.<br />
If you see any other error in status, go check /var/log/messages on head quarter server to find clue.</p>
<p>9. Test the new domain:</p>
<pre>ping ny.infolexllc.com</pre>
<p>You should see the new domain can be resolved to the dynamic IP currently assigned to branch server.</p>
<p>10.<br />
Once update script is working, you can create a cron job on branch<br />
server to run the script every 10 minutes. The script itself will check<br />
if IP has not been changed in the past hour, it will skip remote update.</p>
<p>I've<br />
done this for our branch servers several times. It works very well so<br />
far. I hope this set up can help resolving your problem. Feel free to<br />
let me know f you have any feedback or question.</p>
<p>Cheers!</p>
</div>
</pre>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 1345px; width: 1px; height: 1px; overflow: hidden;">Make sure you change value of the script based-on your own environment.<br />
6. Open the newly generated key file Kny.infolexllc.com.+157+47223.key</p>
<pre>ny.infolexllc.com. IN KEY 0 3 157 QLwMCWdqUJ/ZOsOsdF4Dj/mYD2XwmqSrPL540JE3dwG7FXZwrJulOp16 Y0SySnfOo7+5s1mhZhUiAHxVOSoXnQ==</pre>
<p>Remember the key string started from QlwMC.. all the way to the ending ==<br />
<span style="font-weight: bold;"><br />
On headquarter server:</span><br />
7. Modify named comnfiguration to allow remote DNS update from ny.infolexllc.com</p>
<p>Open /etc/named.conf<br />
Find zone &#8220;infolexllc.com&#8221; {<br />
Insert the following section in the configuration file before the zone:<br />
key ny.infolexllc.com.{<br />
algorithm hmac-md5;<br />
secret &#8220;QLwMCWdqUJ/ZOsOsdF4Dj/mYD2XwmqSrPL540JE3dwG7FXZwrJulOp16 Y0SySnfOo7+5s1mhZhUiAHxVOSoXnQ==&#8221;;<br />
};</p>
<p>Insert the following lines at end of the infolexllc.com zone:<br />
allow-update {<br />
key  ny.infolexllc.com. ;<br />
};</p>
<p>Restart DNS server:</p>
<pre>/etc/init.d/named restart</pre>
<p>Now the headquarter DNS server should allow remote DNS update from ny.infolexllc.com</p>
<p><span style="font-weight: bold;">On branch server:</span><br />
8. Test DNS update script:<br />
run</p>
<pre>donsupdate.sh</pre>
<p>You should see messages like below:</p>
<pre>
Detected IP address is:123.123.123.123
IP has been changed or one hour has been passed, save the flag and do update...
Creating key...
before getaddrinfo()
Outgoing update query:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: UPDATE, status: NOERROR, id:      0
;; flags: ; ZONE: 0, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0
;; UPDATE SECTION:
ny.infolexllc.com. 0 ANY A
ny.infolexllc.com. 84600 IN A 123.123.123.123

Reply from update query:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: UPDATE, status: NOERROR, id:  25321
;; flags: qr ; ZONE: 0, PREREQ: 0, UPDATE: 0, ADDITIONAL: 1
;; TSIG PSEUDOSECTION:
ny.infolexllc.com. 0 ANY TSIG hmac-md5.sig-alg.reg.int. 123123123123 300 16 ABCabcABCabc123+12aBcde== 25321 NOERROR 0
</pre>
<p>The status: NOERROR indicates a succeful update.<br />
If you see any other error in status, go check /var/log/messages on head quarter server to find clue.</p>
<p>9. Test the new domain:</p>
<pre>ping ny.infolexllc.com</pre>
<p>You should see the new domain can be resolved to the dynamic IP currently assigned to branch server.</p>
<p>10.  Once update script is working, you can create a cron job on branch  server to run the script every 10 minutes. The script itself will check  if IP has not been changed in the past hour, it will skip remote update.</p>
<p>I&#8217;ve  done this for our branch servers several times. It works very well so  far. I hope this set up can help resolving your problem. Feel free to  let me know f you have any feedback or question.</p>
<p>Cheers!</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.doyourself.org/networking/790-how-to-bing-dyanmic-ip-to-a-subdomain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reboot Linksys WAG160N / WAG54 / WAG320 / WAG120N Router / Gateway</title>
		<link>http://www.doyourself.org/networking/585-reboot-linksys-wag160n-wag54-wag320-wag120n-router-gateway/</link>
		<comments>http://www.doyourself.org/networking/585-reboot-linksys-wag160n-wag54-wag320-wag120n-router-gateway/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 17:23:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://www.doyourself.org/?p=585</guid>
		<description><![CDATA[&#8216;m using a Cisco Linksys WAG320N Router to connect my OS X UNIX and Linux systems to the Web. How do I reboot my Linksys WAG series router / gateway (modem) from UNIX / Linux / OS X bash command prompt or using a shell script? The Cisco linksys series modem removed reboot option from [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>&#8216;m using a Cisco Linksys WAG320N Router to connect my OS X UNIX and  Linux systems to the Web. How do I reboot my Linksys WAG series router /  gateway (modem) from UNIX / Linux / OS X bash command prompt or using a  shell script?</p>
<p>The Cisco linksys series modem removed reboot option from its web  interface but you can reboot the router using the following url format:</p>
<pre>http://your-router-ip/setup.cgi?todo=reboot

http://192.168.1.1/setup.cgi?todo=reboot</pre>
<p>Sample outputs:</p>
<div id="attachment_8303"><img title="Rebooting Cisco Linksys Router / Gateway Web Interface Command" src="http://files.cyberciti.biz/uploads/faq/2010/07/reboot-cisco-linksys-router-using-web-interface.png" alt="Fig.01: Rebooting Cisco Linksys Router / Gateway " width="599" height="174" />Fig.01: Rebooting Cisco Linksys Router / Gateway</p>
</div>
<p>The web interface hack works with any web browser regardless of the operating system.</p>
<h2>Command Line Options</h2>
<div><img src="http://c.cyberciti.biz/cbzcache/3rdparty/terminal.png" border="0" alt="" /></div>
<p>curl is a command line tool for transferring data with URL syntax,  supporting various protocosl such as  FTP, FTPS, HTTP, HTTPS, SCP, SFTP,  TFTP, TELNET, DICT, LDAP, LDAPS, FILE, IMAP, SMTP, POP3, RTMP and RTSP.  curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading,  HTTP form based upload, proxies, cookies, user+password authentication  (Basic, Digest, NTLM, Negotiate, kerberos), file transfer resume, proxy  tunneling and much more. The same tool can be used to reboot your router  as follows:</p>
<pre>curl -u 'Router-username:password' 'http://192.168.1.1/setup.cgi?todo=reboot'
curl -u 'admin:Your-Password-Here' 'http://192.168.1.1/setup.cgi?todo=reboot'</pre>
<h4>Further readings:</h4>
<p><code>man curl</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.doyourself.org/networking/585-reboot-linksys-wag160n-wag54-wag320-wag120n-router-gateway/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD</title>
		<link>http://www.doyourself.org/networking/532-freebsd/</link>
		<comments>http://www.doyourself.org/networking/532-freebsd/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 08:33:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://www.doyourself.org/?p=532</guid>
		<description><![CDATA[Changing Hostname Temporarly Example: hostname newhostname.com Changing Hostname Permanently Edit the file /etc/rc.conf and change the value in it, Save and exit Changing/Setting main ip Edit the file /etc/rc.conf and change the value of ifconfig_ed0 (The interface name can be different) Example rc.conf file: ### Basic network options: ### hostname=&#8221;myname.my.domain&#8221; # Set this! network_interfaces=&#8221;lo0&#8243; # [...]]]></description>
			<content:encoded><![CDATA[<p></p><h3> Changing Hostname Temporarly</h3>
<p>        <b>Example</b>: hostname newhostname.com</p>
<h3> Changing Hostname Permanently</h3>
<p>        Edit the file /etc/rc.conf and change the value in it, Save and exit</p>
<p></p>
<h3> Changing/Setting main ip</h3>
<p>        Edit the file /etc/rc.conf and change the value of ifconfig_ed0 (The interface name can be different) </p>
<p>	<b>Example rc.conf file</b>:<br />
<br />
  ### Basic network options: ###<br />
   hostname=&#8221;myname.my.domain&#8221; # Set this!</p>
<p>   network_interfaces=&#8221;lo0&#8243;       # List of network interfaces (lo0 is loopback).<br />
You will need to amend this line to tell FreeBSD that you want to add<br />
another device, namely the &#8216;ed0&#8242; device. Change this line to read:<br />
   network_interfaces=&#8221;lo0 rl0&#8243;   # List of network interfaces (lo0 is loopback).<br />
Beneath the line that specifies which interfaces should be activated<br />
are the lines that specify the actual settings for each interface. In<br />
the default /etc/rc.conf file is a single line that says:</p>
<p>   ifconfig_lo0=&#8221;inet 127.0.0.1&#8243;   # default loopback device configuration.<br />
   #You will need to add another line after that to specify the settings for your &#8216;ed0&#8242; device.</p>
<p>   #For our sample configuration we will insert a line immediately after the loopback device definition that says:</p>
<p>   ifconfig_rl0=&#8221;inet 2.1.12.5  netmask 255.255.255.0&#8243;</p>
<p></p>
<h3> Adding more  IPs</h3>
<p>Add aliases in /etc/rc.conf<br />
   #More ips will be aliases<br />
   ifconfig_rl0_alias0=&#8221;inet 2.1.12.6 netmask 255.255.255.0&#8243;<br />
   ifconfig_rl0_alias1=&#8221;inet 2.1.12.7 netmask 255.255.255.0&#8243; </p>
<p>OR Execute below commands <br />
ifconfig rl0 inet 2.1.12.6 netmask 255.255.255.0 alias up<br />
ifconfig rl0 inet 2.1.12.7 netmask 255.255.255.0 alias up</p>
<h3>Updating FreeBSD and installing ports</h3>
<p>#Some softwares use cvsup <br />
cd /usr/ports/net/cvsup-without-gui<br />
make install</p>
<p>#Installing portsnap <br />
pkg_add -r portsnap<br />
mkdir /usr/ports<br />
portsnap fetch<br />
portsnap extract<br />
portsnap update</p>
<p>#Installing apache- It will install perl/python and other dependencies etc automatically<br />
cd /usr/ports/www/apache22<br />
make<br />
make install</p>
<p></p>
<p>#Installing mysql5<br />
cd /usr/ports/databases/mysql50-client<br />
make<br />
make install</p>
<p>cd /usr/ports/databases/mysql50-server<br />
make <br />
make install</p>
<p>#Start scripts are below to start stop them manually<br /> <br />
/usr/local/etc/rc.d/apache22.sh<br />
/usr/local/etc/rc.d/mysql-server.sh</p>
<p># Add the following line to /etc/rc.conf to enable mysql:<br />
# mysql_enable=YES:  Set to &#8220;NO&#8221; by default.<br />
#                       Set it to &#8220;YES&#8221; to enable MySQL.<br />
# mysql_limits (bool):  Set to &#8220;NO&#8221; by default.<br />
#                       Set it to yes to run `limits -e -U mysql`<br />
#                       just before mysql starts.<br />
# mysql_dbdir (str):    Default to &#8220;/var/db/mysql&#8221;<br />
#                       Base database directory.<br />
# mysql_args (str):     Custom additional arguments to be passed<br />
#                       to mysqld_safe (default empty).</p>
<h3>Firewall Setup</h3>
<p>#Load kernel module<br />
kldload ipl </p>
<p>#executing firewall script manually</p>
<p>ipf -Fa -v -f /etc/ipf.rules.script</p>
<p>#Exampl script<br />
#Setup the default allow all rule<br />
pass out from any to any<br />
pass in from any to any</p>
<p>#Allow some ip and your isp ip<br />
pass in quick on rl0 from 4.35.9.0  to 4.35.9.255</p>
<p>#block tcp and icmp traffic for public<br />
block in on rl0 proto tcp from any to any<br />
block in on rl0 proto icmp from any to any</p>
<p>#Allow these for public<br />
pass in on rl0 proto tcp from any to any port = www<br />
pass in on rl0 proto tcp from any to any port = 443<br />
pass in on rl0 proto tcp from any to any port = 21</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doyourself.org/networking/532-freebsd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Centos</title>
		<link>http://www.doyourself.org/networking/531-centos/</link>
		<comments>http://www.doyourself.org/networking/531-centos/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 08:32:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[CentOS]]></category>

		<guid isPermaLink="false">http://www.doyourself.org/?p=531</guid>
		<description><![CDATA[Changing Hostname Temporarly Example: hostname newhostname.com Changing Hostname Permanently Edit the file /etc/sysconfig/network and change the value of HOSTNAME in it, Save and exit To avoid dns errors edit the file /etc/hosts and create a line as below 192.168.1.50 newhostname alias Change ip with your server ip and newhostname and alias with anything you have [...]]]></description>
			<content:encoded><![CDATA[<p></p><h3> Changing Hostname Temporarly</h3>
<p>        <b>Example</b>: hostname newhostname.com</p>
<h3> Changing Hostname Permanently</h3>
<p>        Edit the file /etc/sysconfig/network and change the value of HOSTNAME in it, Save and exit<br /> <br />
	To avoid dns errors edit the file /etc/hosts and create a line as below<br />     192.168.1.50	newhostname	alias<br />
        Change ip with your server ip and  newhostname and alias with anything you have setup</p>
<h3> Changing/Setting main ip</h3>
<p>        Edit the file /etc/sysconfig/network-scripts/ifcfg-eth0 and change the value of IPADDR, NETMASK , NETWORK and BROADCAST<br />
	<b>Example ifcfg-eth0 file</b>:<br />
<br />DEVICE=eth0<br />
BOOTPROTO=none<br />
BROADCAST=192.168.1.255<br />
IPADDR=192.168.1.50<br />
NETMASK=255.255.255.0<br />
NETWORK=192.168.1.0<br />
ONBOOT=yes<br />
USERCTL=no<br />
PEERDNS=no<br />
TYPE=Ethernet</p>
<p>        <b>Description</b>: Dont forget to restart network after the change with below command<br />
 service network restart<br />
 Connect again using new ip if all is well.</p>
<h3> Adding more  IPs</h3>
<p># Copy the config file to create an alias ip<br />
cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:1<br />
<br />#Now edit the new file /etc/sysconfig/network-scripts/ifcfg-eth0:1<br />
and change &#8220;DEVICE=eth0&#8243; to &#8220;DEVICE=eth0:1&#8243; and change ip to the new ip<br />
you want to assign. Save and exit. Then use tbe below command to bring<br />
it live.<br />
ifup eth0:1</p>
<h3> Adding a range of IPs</h3>
<p># Remove ifcfg-eth files from /etc/sysconfig/network-scripts/<br />
#Create a file /etc/sysconfig/network-scripts/ifcfg-eth0-range0 if this<br />
doesnâ€™t exist, or just add to it if you already have it, the following<br />
lines:</p>
<pre>IPADDR_START=192.168.0.100IPADDR_END=192.168.0.200CLONENUM_START=0</pre>
<p>where: IPADDR_START is the first IP and IPADDR_END is the last IP<br />
in the range. CLONENUM_START is the number that will be assigned to the<br />
first IP alias interface (eth0:0 in this example).</p>
<p>If you need to add more ranges of IPs then just use a different file<br />
for ex. ifcfg-eth0-range1, for each one of the ranges. You need to be<br />
careful and use the proper CLONENUM_START to not overwrite other<br />
aliases. Once you have configured the range/s of IPs you just need to<br />
restart the network service in order to activate it:</p>
<pre>service network restart</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.doyourself.org/networking/531-centos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SUSE</title>
		<link>http://www.doyourself.org/networking/530-suse/</link>
		<comments>http://www.doyourself.org/networking/530-suse/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 08:32:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[SUSE]]></category>

		<guid isPermaLink="false">http://www.doyourself.org/?p=530</guid>
		<description><![CDATA[Changing Hostname Temporarly Example: hostname newhostname.com Changing Hostname Permanently Edit the file /etc/HOSTNAME and change the value in it, Save and exit To avoid dns errors edit the file /etc/hosts and create a line as below 192.168.1.50 newhostname alias Change ip with your server ip and newhostname and alias with anything you have setup Changing/Setting [...]]]></description>
			<content:encoded><![CDATA[<p></p><h3> Changing Hostname Temporarly</h3>
<p>        <b>Example</b>: hostname newhostname.com</p>
<h3> Changing Hostname Permanently</h3>
<p>        Edit the file /etc/HOSTNAME and change the value in it, Save and exit<br /> <br />
	To avoid dns errors edit the file /etc/hosts and create a line as below<br />     192.168.1.50	newhostname	alias<br />
        Change ip with your server ip and  newhostname and alias with anything you have setup</p>
<h3> Changing/Setting main ip</h3>
<p>        Edit the file /etc/sysconfig/network/ifcfg-eth0 and change the value of IPADDR, NETMASK , NETWORK and BROADCAST<br />
	<b>Example ifcfg-eth0 file</b>:<br />
<br />DEVICE=eth0<br />
BOOTPROTO=none<br />
BROADCAST=192.168.1.255<br />
IPADDR=192.168.1.50<br />
NETMASK=255.255.255.0<br />
NETWORK=192.168.1.0<br />
ONBOOT=yes<br />
USERCTL=no<br />
PEERDNS=no<br />
TYPE=Ethernet</p>
<p>        <b>Description</b>: Dont forget to restart network after the change with below command<br />
 /sbin/rcnetwork restart<br />
 Connect again using new ip if all is well.</p>
<h3> Adding more  IPs</h3>
<p># Copy the config file to create an alias ip<br />
cp /etc/sysconfig/network/ifcfg-eth0 /etc/sysconfig/network/ifcfg-eth0:1<br />
<br />#Now edit the new file /etc/sysconfig/network/ifcfg-eth0:1 and<br />
change &#8220;DEVICE=eth0&#8243; to &#8220;DEVICE=eth0:1&#8243; and change ip to the new ip you<br />
want to assign. Save and exit. Then use tbe below command to bring it<br />
live.<br />
/sbin/rcnetwork restart</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doyourself.org/networking/530-suse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gentoo</title>
		<link>http://www.doyourself.org/networking/529-gentoo/</link>
		<comments>http://www.doyourself.org/networking/529-gentoo/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 08:32:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Gentoo]]></category>

		<guid isPermaLink="false">http://www.doyourself.org/?p=529</guid>
		<description><![CDATA[Changing Hostname Temporarly Example: hostname newhostname.com Changing Hostname Permanently Edit the file /etc/conf.d/hostname and change the value in it, Save and exit To avoid dns errors edit the file /etc/hosts and create a line as below 192.168.1.50 newhostname alias Change ip with your server ip and newhostname and alias with anything you have setup Changing/Setting [...]]]></description>
			<content:encoded><![CDATA[<p></p><h3> Changing Hostname Temporarly</h3>
<p>        <b>Example</b>: hostname newhostname.com</p>
<h3> Changing Hostname Permanently</h3>
<p>        Edit the file /etc/conf.d/hostname and change the value in it, Save and exit<br /> <br />
	To avoid dns errors edit the file /etc/hosts and create a line as below<br />     192.168.1.50	newhostname	alias<br />
        Change ip with your server ip and  newhostname and alias with anything you have setup</p>
<h3> Changing/Setting main ip</h3>
<p>        Edit the file /etc/conf.d/net and change the IP and Gateway in it.<br />
	<b>Example net file</b>:<br />
config_eth0=(<br />
  25.35.25.12/24<br />
  25.35.25.13/24<br />
  )<br />
routes_eth0=( &#8220;default gw 25.35.25.1&#8243; )</p>
<p>        <b>Description</b>: Dont forget to restart network after the change with below command<br />
 /etc/rc.d/net.eth0 restart<br />
 Connect again using new ip if all is well.</p>
<h3> Adding more  IPs</h3>
<p>Simply add more ips in /etc/conf.d/net</p>
<p>config_eth0=(<br />
  25.35.25.12/24<br />
  25.35.25.13/24<br />
  25.35.25.14/24<br />
  25.35.25.15/24<br />
  25.35.25.16/24<br />
  25.35.25.17/24<br />
  )<br />
routes_eth0=( &#8220;default gw 25.35.25.1&#8243; )</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doyourself.org/networking/529-gentoo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SlackWare</title>
		<link>http://www.doyourself.org/networking/528-slackware/</link>
		<comments>http://www.doyourself.org/networking/528-slackware/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 08:32:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[SlackWare]]></category>

		<guid isPermaLink="false">http://www.doyourself.org/?p=528</guid>
		<description><![CDATA[Changing Hostname Temporarly Example: hostname newhostname.com Changing Hostname Permanently Edit the file /etc/HOSTNAME and change the value in it, Save and exit To avoid dns errors edit the file /etc/hosts and create a line as below 192.168.1.50 newhostname alias Change ip with your server ip and newhostname and alias with anything you have setup Changing/Setting [...]]]></description>
			<content:encoded><![CDATA[<p></p><h3> Changing Hostname Temporarly</h3>
<p>        <b>Example</b>: hostname newhostname.com</p>
<h3> Changing Hostname Permanently</h3>
<p>        Edit the file /etc/HOSTNAME and change the value in it, Save and exit<br /> <br />
	To avoid dns errors edit the file /etc/hosts and create a line as below<br />     192.168.1.50	newhostname	alias<br />
        Change ip with your server ip and  newhostname and alias with anything you have setup</p>
<h3> Changing/Setting main ip</h3>
<p>        Edit the file /etc/rc.d/rc.inet1.conf and change the value of IPADDR and NETMASK </p>
<p>	<b>Example rc.inet1.conf file</b>:<br />
<br />
# Config information for eth0:<br />
IPADDR[0]=&#8221;33.74.27.5&#8243;<br />
NETMASK[0]=&#8221;255.255.255.0&#8243;<br />
USE_DHCP[0]=&#8221;"<br />
DHCP_HOSTNAME[0]=&#8221;"</p>
<p># Config information for eth1:<br />
IPADDR[1]=&#8221;"<br />
NETMASK[1]=&#8221;"<br />
USE_DHCP[1]=&#8221;"<br />
DHCP_HOSTNAME[1]=&#8221;"</p>
<p># Default gateway IP address:<br />
GATEWAY=&#8221;33.74.27.1&#8243;</p>
<h3> Adding more  IPs</h3>
<p>Execute below commands and Add them in /etc/rc.d/rc.local<br />
/sbin/ifconfig eth0:1 33.74.27.5<br />
/sbin/ifconfig eth0:2 33.74.27.6<br />
/sbin/ifconfig eth0:3 33.74.27.7</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doyourself.org/networking/528-slackware/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fedora Core</title>
		<link>http://www.doyourself.org/networking/527-fedora-core/</link>
		<comments>http://www.doyourself.org/networking/527-fedora-core/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 08:32:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Core]]></category>
		<category><![CDATA[Fedora]]></category>

		<guid isPermaLink="false">http://www.doyourself.org/?p=527</guid>
		<description><![CDATA[Changing Hostname Temporarly Example: hostname newhostname.com Changing Hostname Permanently Edit the file /etc/sysconfig/network and change the value of HOSTNAME in it, Save and exit To avoid dns errors edit the file /etc/hosts and create a line as below 192.168.1.50 newhostname alias Change ip with your server ip and newhostname and alias with anything you have [...]]]></description>
			<content:encoded><![CDATA[<p></p><h3> Changing Hostname Temporarly</h3>
<p>        <b>Example</b>: hostname newhostname.com</p>
<h3> Changing Hostname Permanently</h3>
<p>        Edit the file /etc/sysconfig/network and change the value of HOSTNAME in it, Save and exit<br /> <br />
	To avoid dns errors edit the file /etc/hosts and create a line as below<br />     192.168.1.50	newhostname	alias<br />
        Change ip with your server ip and  newhostname and alias with anything you have setup</p>
<h3> Changing/Setting main ip</h3>
<p>        Edit the file /etc/sysconfig/network-scripts/ifcfg-eth0 and change the value of IPADDR, NETMASK , NETWORK and BROADCAST<br />
	<b>Example ifcfg-eth0 file</b>:<br />
<br />DEVICE=eth0<br />
BOOTPROTO=none<br />
BROADCAST=192.168.1.255<br />
IPADDR=192.168.1.50<br />
NETMASK=255.255.255.0<br />
NETWORK=192.168.1.0<br />
ONBOOT=yes<br />
USERCTL=no<br />
PEERDNS=no<br />
TYPE=Ethernet</p>
<p>        <b>Description</b>: Dont forget to restart network after the change with below command<br />
 service network restart<br />
 Connect again using new ip if all is well.</p>
<h3> Adding more  IPs</h3>
<p># Copy the config file to create an alias ip<br />
cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:1<br />
<br />#Now edit the new file /etc/sysconfig/network-scripts/ifcfg-eth0:1<br />
and change &#8220;DEVICE=eth0&#8243; to &#8220;DEVICE=eth0:1&#8243; and change ip to the new ip<br />
you want to assign. Save and exit. Then use tbe below command to bring<br />
it live.<br />
ifup eth0:1</p>
<h3> Adding a range of IPs</h3>
<p># Remove ifcfg-eth files from /etc/sysconfig/network-scripts/<br />
#Create a file /etc/sysconfig/network-scripts/ifcfg-eth0-range0 if this<br />
doesnâ€™t exist, or just add to it if you already have it, the following<br />
lines:</p>
<pre>IPADDR_START=192.168.0.100IPADDR_END=192.168.0.200CLONENUM_START=0</pre>
<p>where: IPADDR_START is the first IP and IPADDR_END is the last IP<br />
in the range. CLONENUM_START is the number that will be assigned to the<br />
first IP alias interface (eth0:0 in this example).</p>
<p>If you need to add more ranges of IPs then just use a different file<br />
for ex. ifcfg-eth0-range1, for each one of the ranges. You need to be<br />
careful and use the proper CLONENUM_START to not overwrite other<br />
aliases. Once you have configured the range/s of IPs you just need to<br />
restart the network service in order to activate it:</p>
<pre>service network restart</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.doyourself.org/networking/527-fedora-core/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

