Category Archives: NETWORK

SFTP ONLY CHROOT


SFTPONLY
groupadd sftponly
useradd user2015
usermod -aG sftponly user2015
passwd user2015

vim /etc/ssh/sshd_config

Comment :

#Subsystem sftp /usr/libexec/openssh/sftp-server

Replace

Subsystem sftp internal-sftp

#Add di beris terakhir

Match Group sftponly
ChrootDirectory %h
ForceCommand internal-sftp
X11Forwarding no
AllowTcpForwarding no

sudo -u user2015 mkdir -pv /home/user2015/upload
chown root. /home/user2015
chmod 755 /home/user2015
chgrp -R sftponly /home/user2015

service sshd restart

#ACL
setfacl -R -m u:apache:rwx /home/user2015
setfacl -R -m g:apache:rwx /home/user2015

CENTOS + Fix out of order network interfaces in Linux


[root@tester1 ~]# cat /etc/udev/rules.d/70-persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”08:00:27:02:7c:43″, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″

# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”08:00:27:b8:1b:75″, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth1″
[root@tester1 ~]#

[root@tester1 ~]# rm -rf  /etc/udev/rules.d/70-persistent-net.rules

[root@tester1 ~]# rm -rf /etc/sysconfig/network-script/ifcg-eth[23]

[root@tester1 ~]# reboot

Protected: Fix out of order network interfaces in Linux


This content is password protected. To view it please enter your password below:

shisdew

Listens until think alike

moses.spaceku@yahoo.com / voip ipbx

Hosted PBX, IP-PBX SOHO/ CALL CENTER, VOICE GATEWAY, VOICE CARD, COST EFECTIVE SOLUTIONS (LCR), GSM/CDMA GATEWAY

%d bloggers like this: