Configuring ddclient

ddclient updates IP addresses at dynamic DNS services.

# install ddclient
$ sudo apt-get install ddclient

Configuring dyndns.com

Selected dyndns.com in the installation process and followed the prompts. Did not need to manually enter anything.

Configuring namecheap.com

Enable Dynamic DNS for your domain
Login to your Namecheap control panel and enable dynamic DNS for your domain.
You’ll get a really long password string to use. Save that for now as you’ll need it later on.
namecheap dynamic dns password

$ sudo nano /etc/ddclient.conf

# namecheap.com example configuration
# the login is the domain name and password is the hash you saved in the prior step called ‘Dynamic DNS Password’.

# Configuration file for ddclient generated by debconf
#
# /etc/ddclient.conf

protocol=namecheap
use=web, web=dynamicdns.park-your-domain.com/getip, web-skip='IP Address'
server=dynamicdns.park-your-domain.com
login=baligena.com
password='36e39d6fief87be5e38c7d7507863'
@,www

# remove cache
$ sudo rm /var/cache/ddclient/ddclient.cache

# force update, you may need to delete cache
$ sudo ddclient --daemon=0 --debug --verbose --noquiet

# another configuration file
$ sudo nano /etc/default/ddclient
# to enable automatic updates you must enable the daemon, see specified settings

run_dhclient="false"
run_ipup="false"
run_daemon="true"
daemon_interval="300"

# restart ddclient
$ sudo /etc/init.d/ddclient restart

source:

tags:
ddns, Dynamic DNS

iptables

iptables is a unix firewall.  The name is not self descriptive.  Below are some notes I gathered.

Allow node.js port 3000 to be accessed outside the machine.  Vagrant (the inside) and windows (the outside).  The 1st one is to add a rule to the beginning and the 2nd is to append at the end of all the rules.  Ultimately they are the same.  Be careful with the second one because rules before will take preference.
$ sudo iptables -I INPUT -p tcp --dport 3000 -j ACCEPT
$ sudo iptables -A INPUT -p tcp --dport 3000 -j ACCEPT

Using Iptables on Linux

Webmin

Webmin is a web-based system configuration tool for Unix-like systems.  Can configure shorewall6.

Installation
https://www.digitalocean.com/community/tutorials/how-to-install-webmin-with-ssl-on-ubuntu-14-04

Setting up Ubuntu Server on Laptop

Dell Latitude D630

FTP WordPress

  • attempting to install plugins via FTP
  • setup FTP
    • http://baligena.com/ftp-server-setup/
    • possible errors
      • Unable to locate WordPress Content directory (wp-content).
      • alt text
        • ftp not opening correct folder
        • change the user folder ftp is pointing to
          • $ usermod --home /var/www/wordpress/ john
  • alternative to FTP
  • possible errors

Stop DNS hijacking and setting DNS server

– disable DNS hijacking
– change DNS server
– setting up google as DNS server

What is DNS hijacking ?
– DNS redirecting

Why don’t I want it ?
– When I but a url that is not recognized it gets redirected to ads
– It interferes with avahi-daemon (zeroconf)

How do I know its occurring ?
– by typing a non existing url in the browser
– ping a non existing url
– in windows by running nslookup in the command line and seeing a foreign ip address

How to stop it ?
– setting up a specific router (http://hackercodex.com/guide/how-to-stop-isp-dns-server-hijacking/)
– or changing your computer dns server (https://developers.google.com/speed/public-dns/docs/using)
– use QuickSetDNS

More ?
– in windows command line running ipconfig /all will show what dns server you’re running

In linux
You will need to edit the ‘/etc/resolv.conf’ with the nameserver of your choice. You can manually edit it (without restarting anything) and have it work however it you restart you computer it will be overwritten by resolvconf. To avoid the overwriting you need to edit ‘/etc/resolvconf/resolv.conf.d/head’ instead. Now if you cannot find that file you will need to update ‘resolvconf’ by running ‘$ apt-get install resolvconf’ (had to do it for raspberry pi). source
To force resolvconf to update /etc/resolv.conf run
$ sudo resolvconf -u

Another ‘not a good idea’ option is to use ‘$ chattr +i’ to lock down ‘resolv.conf’ which seems hacky

tags:
time warner
bright house network

Laravel Homestead Vagrant windows setup

video notes:
9:35 editing hosts files
6:13 putty ssh to vagrant server

# start vagrant
# inside C:\Users\username\Desktop\vagrant\Code
$ vagrant up

# the url will be http://homestead.app:8000/

# vagrant for public access
# http://stackoverflow.com/questions/18051760/how-to-access-vagrant-box-in-public-network#answer-18068143

config.vm.network :public_network, ip: "192.168.1.21"

# to allow symbolic links, ln -s
# in windows 7 you need to run the terminal as administrator
https://github.com/cityindex-attic/logsearch/issues/7#issuecomment-19054050

FTP Server Setup

In ubuntu 14.04

How to setup FTP server on ubuntu 14.04 ( VSFTPD )

In ubuntu 12.04

mkdir /home/user/ftpfiles
sudo su
apt-get install vsftpd
cp /etc/vsftpd.conf.bak
nano /etc/vsftpd.conf
groupadd ftpusers
useradd -g ftpusers -d /home/user/ftpfiles newusername
passwd newusername
chmod 775 /home/user/ftpfiles
chown root:ftpusers /home/user/ftpfiles
chmod a-w /home/user/ftpfiles
service vsftpd restart
ftp localhost

errors:
500 OOPS: could not read chroot() list file:/etc/vsftpd.chroot_list
– /etc/vsftpd.chroot_list file doesnt exist created it
– touch /etc/vsftpd.chroot_list

500 OOPS: vsftpd: refusing to run with writable root inside chroot ()
– chmod a-w /home/user/ftpfiles
– https://www.benscobie.com/fixing-500-oops-vsftpd-refusing-to-run-with-writable-root-inside-chroot/

– resource:
– https://www.youtube.com/watch?v=BTGBE1Ae1LA

Setup XMPP Openfire ubuntu

Setup instructions
https://library.linode.com/communications/xmpp/openfire/debian-6-squeeze

Web based client:
Here how to get it working on a Debian/Ubuntu server
Make sure you have HTTP Binding Enabled: from web panel go to Server Settings -> HTTP Binding -> Enabled – Clients can connect to this server using HTTP binding
Create /usr/share/openfire/resources/spank directory and copy the content of the sparkweb zip file
Next change permission:
$ chown -R openfire.openfire /usr/share/openfire/resources/spank

$ chmod -R 750 /usr/share/openfire/resources/spank
Now, restart server with
$ /etc/init.d/openfire restart
and open your web browser to http://your_server_ip:7070/webchat

resources:
http://community.igniterealtime.org/docs/DOC-2109#comment-6568