Posts

Showing posts from 2009

sendmail in opensolaris

...by default is accepting connections only from localhost . Not very useful if you want to have a functional mail server. To allow connections from everywhere svccfg is the way to do it: #svccfg -s sendmail setprop config/local_only=false Don't forget to : #svcadm refresh sendmail and restart the sendmail server: #svcadm restart sendmail To check if it is ok, run: #svcprop sendmail [...] config/local_only boolean false [...] and telnet your_host 25 from outside. More info about svcprop and svccfg .

ProFTPD pakage for opensolaris

In opensolaris there is no proftpd package, so I decide to build it and to make a pkg First, you must decide how many packages you will need and what will be their names the distributables names have the form: <$PKG>-<$VERSION>--<$ARCH>-local[.tgz] where local means that the package is installable on /opt or /usr/local According to the solaris filesystem ( man filesystem ), add-on software could install files only on: /opt/ /etc/opt/ /var/opt/ /var/svc/manifest /var/tmp /usr/local is not an SVR4 approved directory: /usr is availble only for Solaris bundled software; exceptionally, /usr/local could be a softlink to /opt/local the usernames are limited to 8 characters. In opensolaris the pkg have the name format XXXyyy, where XXX is the name of the of company and tge yyy is the name of the software.For example, SUNWpostgr-83-libs So, let's start work on the proftpd pkg file. Setup the directory structure in your home direc

ProFTPD manifest xml for opensolaris

In order to start/stop/refresh proftpd using SMF method, you need two files, the manifest xml file and the start/stop/refresh proftpd script. First, the xml file: <?xml version="1.0"?> <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> <service_bundle type="manifest" name="proftpd-server">  <service  name="network/proftpd-server"    type="service"    version="1">   <create_default_instance enabled="false">   <single_instance>    <dependency name='net-loopback'   grouping='require_all'   restart_on='none'   type='service'>   <service_fmri value="'svc:/network/loopback'">   </dependency>   <dependency name='net-physical'   grouping='require_all'  

ProFTPD in opensolaris

"Highly configurable GPL-licensed FTP server software", but in opensolaris the provided package from blastwave lacks in support of postgresql connectivity. So, the solution is to download the tar.gz from here and compile it. Here we go : root@freya:~/work/proftpd# ls proftpd-1.3.2.tar.gz root@freya:~/work/proftpd# tar -xvf proftpd-1.3.2.tar.gz [...] After unpacking type in the proftpd dir: ./configure --prefix=/usr/proftpd-1.3.2 --enable-dso --with-modules=mod_tls --with-shared=mod_sql:mod_sql_postgres:mod_quotatab:mod_quotatab_file:mod_quotatab_sql --with-includes=/usr/postgres/8.3/include/ --with-libraries=/usr/postgres/8.3/lib/ !!!!! the order of shared modules is important, mod_sql , must be in front of mod_sql_postgres , or else your proftpd server will not start !!!! If everything is ok, run make & make install This will install proftpd in /usr/proftpd-1.3.2 dir (you can change the prefix) Also, in order to have postgresql connectivity from proftpd, you need to

Howto install crossbow in opensolaris

"Crossbow provides the building blocks for network virtualization and resource control by virtualizing the stack and NIC around any service (HTTP, HTTPS, FTP, NFS, etc.), protocol or Virtual machine." More info about crossbow project here First, you need to install BFU. Download it from here here root@opensolarais:~/work# tar xfv SUNWonbld-20060828.i386.tar.bz2 root@opensolarais:~/work# cd onbld If you have an old version of BFU uninstall it first root@opensolarais:~/work# pkgrm SUNWonbld If not just, install it in your system using pkgadd command. root@opensolarais:~/work# pkgadd -d . SUNWonbld If everything is ok, you should have in opt the following: root@opensolaris:/opt/onbld# pwd /opt/onbld root@opensolaris:/opt/onbld# ls bin env etc gk lib man Anyway, the bfu command is not in your path, so you must add the following lines in your .profile file root@opensolaris:~# vi .profile [..] export PATH=/opt/onbld/bin:/opt/onbld/bin/i386: export FASTFS=/opt/onbld/bin/i386/f

NAT in opensolaris

Firt, you must enable ip forwarding in your opensolaris box. Let's suppose thet we have two network adapters, one is elxl0(80.xxx.xxx.xxx), this is connect to the internet, and the second one is e1000g0 connected to the intranet (172.16.16.1) ipnat.conf file can be located anyware on the system, in /etc/ipnat.rules, /usr/local/etc/ipnat.rules, or /etc/opt/ipf/ipnat.rules In opensolaris, /network/ipv4-forwarding service is using /etc/ipf/ipnat.conf file cd /etc/ipf echo >> ipnat.conf (if it's missing) Insert in ipnat.conf file this line map elxl0 172.16.16.0/24 -> 0/32 The easiest way to load a NAT rule set is: ipnat -CF -f /etc/ipnat.conf To test if the rules from ipnat.rules are loaded, type from root account: ipnat -l The output look like this root@freya:/etc/ipf# ipnat -l List of active MAP/Redirect filters: map elxl0 172.16.16.0/24 -> 0.0.0.0/32 [...] List of active sessions: MAP 172.16.16.2 12769 <- -> 80.xxx.xxx.xxx 12769 [86.xxx.21.xxx 53

Freya

Like I said in an old post , my old server is dead. So I bought a new one, and it's running opensolaris(SunOS 5.11) for about 8 days now. Stay tuned for some new posts about network, nat, portforwarding and other interesting stuff from opensolaris

loki is dead

After serving me for more then 8 years(it was my desktop during school), and working non stop for the last 400 days, loki, my gateway server, is dead. I don't know why, maybe the cpu, the motherboard, or the ram. I'm thinking to revive it, but this time it will run opensolaris.This will be fun!!! RIP:)