<$BlogRSDUrl$>

FreeBSD 4.8

Sunday, July 25, 2004

Installing MySQL on OpenBSD 

Installing MySQL on OpenBSD

Thursday, December 04, 2003

make.conf & mk.conf 

MASTER_SITE_OVERRIDE?= ftp://ftp.openbsd.org/pub/OpenBSD/distfiles/

bagus untuk client behind proxy

Thursday, October 30, 2003

ntop - shows the current network usage 

install ntop /usr/ports/net/ntop

Monday, October 20, 2003

Start Webmin  

#start webmin
sh /usr/local/etc/webmin/start

Saturday, October 18, 2003

Another Streamyx Dialer [this is smart dialer] 

Setting Up TMNet Streamyx
How to squeeze the most out of TMNet



This tutorial will covers on how to setup your TMNet Streamyx connection on your FreeBSD system. Please note that however this tutorial only covers "Home Package" type. It does not cover the "Enterprise Package" and "Corporate Package", because the procedure is quite different for these types.

We will be using the FreeBSD ppp to create a Point-to-Point Tunnelling over Ethernet (PPPoe) tunnel to TMNet Stremyx server.

Basic Configuration
Make sure you are logged in as root user. I am assuming that you have only one network interface card that is connected directly to the DSL modem by a cross cable (the Telekom technician should set it up like this). First, edit your /etc/ppp/ppp.conf file. If the file does not exist, create it. Key in the information as provided in the table below (do not type in the line number). Please note that you must replace the ed0 interface in line 3 to your network interface card that is connected to your DSL modem. If you do not know the interface name, you can issue command ifconfig -lu at the prompt. Choose the one that is not "lo0". Remember to put in your username and password in line 6 and 7 respectively, replacing "yourname" and "yourpassword"

1 default:
2 pppoe:
3 set device PPPoE:ed0:
4 enable lqr
5 enable dns
6 set authname yourname@streamyx
7 set authkey yourpassword
8 add default HISADDR
9 set cd 5
10 set dial
11 set login
12 set redial 1 0
13 set timeout 0
14 set urgent udp +53
15 nat enable yes
16 nat use_sockets yes
17 iface clear

Save the file /etc/ppp/ppp.conf. Now edit file /etc/rc.conf. Append the following lines to the end of the file:

ppp_enable="YES"
ppp_mode="ddial"
ppp_nat="YES"
ppp_profile="pppoe"

Save the file. The settings in /etc/rc.conf will cause the connection to be brought up immediately upon every reboot. We set the mode to "ddial", meaning that the connection will be established immediately, and whenever disconnection occurs, the ppp daemon will automatically try to established connection to TMNet Streamyx again.

To immediately bring your connection up, you can issue this command at the prompt:

# /usr/sbin/ppp -quiet -ddial -nat pppoe

Provided your authentication information is entered correctly in /etc/ppp/ppp.conf, you will be connected immediately. You can test it trying to ping TMNet nameserver (press Ctrl+C to abort):

# ping 202.188.0.132

You should receive a reply. If not, you need to recheck again your configuration.

The last step is to point to TMNet nameserver for domain name resolutions. To do this, edit file /etc/resolv.conf and append this lines into the file:

nameserver 202.188.0.132
nameserver 202.188.0.133
nameserver 202.188.1.5

Save the file. Now try to ping something to test if the changes really work:

# ping ns1.tm.net.my

If you receive a reply, then it is working perfectly.
Network Address Translation (NAT) Setup

If you have several computers and you want to let the FreeBSD machine becomes the gateway, then you will need to do some further configuration. With NAT, all your computers can be connected to the Internet at the same time, with your FreeBSD gateway transparently rewriting source and destination address and port for your other computers.

The basic step is still the same, so make sure you have completed all the basic configuration steps outlined above. To become gateway for other computers, you will need another network card. So now you should have two network cards, one being connected by cross cable to the DSL modem, and another network card is connected to your hub or switch. To make it easy for this tutorial, we shall assume that the network card connected to your DSL modem is ed0, and the network card connected to your hub or switch is rl0. With this convention in mind, you will need to change it appropriately to match your configuration throughout this text.

We need to assign private Class A IP address to the rl0 interface. We also need to set our FreeBSD as the gateway. Now, to do this, edit file /etc/rc.conf, and add this line at the end of the file:

gateway_enable="YES"
ifconfig_rl0="inet 10.0.0.1 netmask 255.255.255.0"

Save the file. To make the changes immediate waiting going for a full reboot, you can issue this command at the prompt:

# ifconfig rl0 inet 10.0.0.1 netmask 255.255.255.0 up

We have finished configuring on the server part. Now on the client part, for every other computer that you want to be able to go online, edit its TCP/IP settings and specify its IP address in the range 10.0.0.2 to 10.0.0.254. You can put whatever IP address you want, as long as it is in the range I mentioned, and one IP address is not being used on more than one computer. You might also need to change its netmask to 255.255.255.0 if it is not being done already. Then, you need to set gateway to point to our FreeBSD server, to 10.0.0.1. And finally, set the DNS server with the TMNet nameserver IP address: 202.188.0.132, 202.188.0.133, and 202.188.1.5. This is only a general guide on what values to put on the other computers, because for the actual step you have to refer to the manual of the particular operating system that you are using.

When you have finish completing this steps, you should now be able to access the Internet on both your FreeBSD machine, and the other machines on your network.
Advanced Configurations

But that is not the of it. You can still customize it further. For example, you if are using the Dynamic DNS service to provide domain name for your computer, you can instruct the ppp daemon to update your IP address at the Dynamic DNS entry the moment you are online or changing IP address. To do this, edit or create the file /etc/ppp/ppp.linkup and append the following lines:

pppoe:
!bg /usr/local/sbin/ddup --host yourdomain.homeunix.com --wildcard

So now, every time connection is established to TMNet Streamyx, your new IP address will be updated on the Dynamic DNS entry. But for this to actually works, you must have already subscribe to use Dynamic DNS serverice, and you must install the net/ddup port.


Reminder

The next time when you do a source system upgrade, please remember not to overwrite the files under /etc/ppp/ directory that you have configured when you run mergemaster, or else you will have to restore back the file.

Why This Kind of Setup?


I know the DSL modem can do NAT. But with the setup I presented in this tutorial, apart from being a good educational exercise, it is far more flexible. You can put your own firewall, IP forwarding and redirecting, traffic logging, traffic shaping, and many more. The list is endless, it is limited only by your own creativity.








by Nuzrin Yaapar

Monday, October 13, 2003

Update Ports 

cd /usr/ports/sysutils/portupgrade execute make install
-update port

Apache dalam freeBSD 

Apache dalam freeBSD
-install apache dulu /usr/ports/www/apache
-install mod php4 /usr/ports/www/mod_php4
-install install mod perl /usr/ports/www/mod_perl

Where Downloaded Ports Placed 

cd /usr/ports/distfiles
-semua source files yg dah donload via ports make install ...
all the tar.gz tu dah been customized for fbsd ... header files .. library .. ets .. ets

Monday, September 22, 2003

Selecting Windows  

To run any kind of windows we need to edit this file .xinitrc and put this command ".xinitrc"

/root/.xinitrc
exec startkde

This page is powered by Blogger. Isn't yours?