Sunday, July 17, 2016

ip addr command 4 RHEL/CentOS/Fedora

 IP addr command 4 RHEL/CentOS/Fedora

Static IP Address configuration:

[root@centos ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0


DEVICE="eth1"
BOOTPROTO=static
ONBOOT=yes
TYPE="Ethernet"
IPADDR=192.168.0.2
NAME="System eth0"
HWADDR=00:0C:00:AF:BB:4C
GATEWAY=192.168.0.1


How to Assign a IP Address to Specific Interface

ip addr add 192.168.0.2 dev eth1

How to Check an IP Address

ip addr show

How to Remove an IP Address

ip addr del 192.168.0.2/24 dev eth1


How to Enable Network Interface

ip link set eth1 up

How to Disable Network Interface

ip link set eth1 down



How do I Check Route Table

ip route show

How do I Add Static Route

ip route add 10.10.10.0/24 via 192.168.0.10 dev eth1

How to Remove Static Route

ip route del 10.10.10.0/24


How do I Add Persistence Static Routes

vi /etc/sysconfig/network-scripts/route-eth0
10.10.10.0/24 via 192.168.0.10 dev eth1

How do I Add Default Gateway

ip route add default via 192.168.0.1




Sunday, July 10, 2016

EdgeMAX -- Quick & Dirty - Syslog Server

EdgeMAX --  Quick & Dirty CLI setup remote syslog server

set system syslog host <syslog_server> facility all level notice

commit
save

exit



Sunday, July 3, 2016

FreeBSD & PPPOE

FreeBSD & PPPOE -- Quick and dirty 
Add below configuration to /etc/ppp/ppp.conf, where <interface> is your network interface toward the PPPoE server:

provider:
set device PPPoE:<interface>
set authname <PPPoE username>
set authkey <PPPoE password>
set dial
set login
add default HISADDR
enable lqr echo
enable dns
nat enable yes
set redial 2
 Start the PPPoE client, as root: /etc/rc.d/ppp start. The PPPoE interface is usually tun0.
In order to enable PPPoE client at startup, append to next info to /etc/rc.conf:
ifconfig_<interface>="up"
ppp_enable="YES"
ppp_profile="provider"
ppp_mode="ddial"

Sunday, June 12, 2016

MAC OSX - burn ISO to usb


MAC OSX - burn ISO to usb

In Terminal run diskutil list command:
diskutil list  :

/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *128.0 GB   disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS System                  127.2 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
 
/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *8.0 GB     disk2
   1:             Windows_FAT_32 BFPORTABLE2             8.0 GB     disk2s1 


 
sudo diskutil unmountDisk /dev/disk2

sudo dd if=~/Downloads/ISO_FILE.ISO of=/dev/disk2 bs=1m

Wednesday, June 8, 2016

bash set HTTP_PROXY


 Set Linux/FreeBSD/NetBSD/OpenBSD environment HTTP_PROXY & HTTPS_PROXY variable in bash:
 
 
   export http_proxy=http://10.0.0.54:5127/
 
OR below line if username/password authorization is needed:
   export  http_proxy=http://USERNAME:PASSWORD@proxy.myname.com:3128/ 
 

   export https_proxy=$http_proxy
   export ftp_proxy=$http_proxy
   export rsync_proxy=$http_proxy
   export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
 
for compatibility reasons, below lines can be used too:
   export HTTP_PROXY=$http_proxy 
   export HTTPS_PROXY=$http_proxy
   export FTP_PROXY=$http_proxy 
   export NO_PROXY=$no_proxy
 
 
 Additionally, above lines can be added to ~/.bashrc for persistent settings.
 
Test the implementation using  wget http://www.synapse.ro
 
 
Never the less, in order to keep HTTP_proxy variables to sudo shell, add next line to sudo configuration file (/etc/sudoers):
 
Defaults env_keep += "http_proxy https_proxy ftp_proxy no_proxy rsync_proxy" 

Monday, June 6, 2016

Sennheiser DW PRO DECT headset - default audio device



Sennheiser DW PRO DECT headset  - default audio device

How do I select my USB headset as a default device?





Sennheiser DW PRO DECT headset & Windows 8

Sennheiser DW PRO DECT headset & Windows 8



Windows 8

To enable audio in some application on Windows 8:
1) Press the Windows + W key.
2) Type "Sound" into the Search field.
3) Click Sound from the list of results. The Sound window opens.
4) On the Playback tab, select your headset, and then click the Properties button. The Headset Earphone Properties window appears.
5) Click the Advanced tab.
6) From the Default Format drop-down list, select the desired sample rate (e.g., 1 channel, 16 bit, 16000 Hz (Table Recorder Quality)).
7) Click OK to save your changes.
8) Click OK again to exit the Sound window