Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2018
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.66 KB | None | 0 0
  1. Root history
  2. 1 clear
  3. 2 apt update
  4. 3 nano /etc/network/interfaces
  5. 4 ifconfig
  6. 5 nano /etc/network/interfaces
  7. 6 ip link show
  8. 7 nano /etc/network/interfaces
  9. 8 service networking reload
  10. 9 ifconfig
  11. 10 service networking stop
  12. 11 service networking start
  13. 12 ifconfig
  14. 13 apt update
  15. 14 nano /etc/network/interfaces
  16. 15 service networking restart
  17. 16 apt update
  18. 17 apt upgrade -y
  19. 18 apt update
  20. 19 htop
  21. 20 apt install htop
  22. 21 htop
  23. 22 free
  24. 23 dd if=/dev/zero of=/swapfile bs=1024 count=12230864
  25. 24 mkswap /swapfile
  26. 25 swapon /swapfile
  27. 26 chmod 600 /swapfile
  28. 27 swapon /swapfile
  29. 28 swapoff /swapfile
  30. 29 swapon /swapfile
  31. 30 nano /etc/fstab
  32. 31 htop
  33. 32 clear
  34. 33 apt install ltsp-server-standalone -y
  35. 34 reboot
  36. 35 ltsp-build-client
  37. 36 reboot
  38. 37 cd /etc/ltsp/
  39. 38 ls
  40. 39 nano dhcpd.conf
  41. 40 service --status-all
  42. 41 reboot
  43. 42 ltsp-chroot
  44. 43 ltsp-update-image
  45. 44 nano /var/lib/tftpboot/ltsp/amd64/lts.conf
  46. 45 sysctl -w net.ipv4.ip_forward=1
  47. 46 iptables --table nat --append POSTROUTING --out-interface enp1s0f1 -j MASQUERADE
  48. 47 apt install iptables-persistent -y
  49. 48 iptables --table nat --append POSTROUTING -j MASQUERADE --source 192.168.67.0/8
  50. 49 iptables-save > /etc/iptables/rules.v4
  51. 50 reboot
  52. 51 cd /var/log/
  53. 52 ls
  54. 53 ls -la
  55. 54 tail -f syslog
  56. 55 tail -f auth.log
  57. 56 useradd -m test
  58. 57 chpasswd
  59. 58 chpasswd -h
  60. 59 chpasswd
  61. 60 echo test:passwd | chpasswd --
  62. 61 ltsp-update-sshkeys; ltsp-update-image
  63. 62 ltsp-chroot
  64. 63 tail -f auth.log
  65. 64 ltsp-chroot
  66. 65 apt install lubuntu-desktop -y
  67. 66 apt remove lubuntu-desktop -y --purge; apt autoremove -y
  68. 67 apt --fix-missing
  69. 68 apt update
  70. 69 apt -h
  71. 70 nano /etc/iptables/rules.v4
  72. 71 reboot
  73. 72 nano /etc/iptables/rules.v4
  74. 73 service reboot
  75. 74 reboot
  76. 75 bash -c 'iptables-save > /etc/ltsp/nat'
  77. 76 cd /etc/ltsp/
  78. 77 more nat
  79. 78 nano /etc/iptables/rules.v6
  80. 79 nano /etc/iptables/rules.v4
  81. 80 nano nat
  82. 81 nano /etc/network/interfaces
  83. 82 apt remove iptables-persistent
  84. 83 cd /etc/iptables/
  85. 84 rm *
  86. 85 reboot
  87. 86 nano /etc/network/interfaces
  88. 87 sysctl -w net.ipv4.ip_forward=1
  89. 88 iptables --table nat --append POSTROUTING --out-interface enp1s0f1 -j MASQUERADE
  90. 89 apt install iptables-persistent
  91. 90 iptables-save > /etc/iptables/rules.v4
  92. 91 nano /etc/iptables/rules.v4
  93. 92 nano /etc/network/interfaces
  94. 93 reboot
  95. 94 nano /var/lib/tftpboot/ltsp/amd64/lts.conf
  96. 95 ltsp-update-sshkeys
  97. 96 ltsp-update-image
  98. 97 apt remove iptables-persistent
  99. 98 iptables --flush
  100. 99 cd /etc/iptables/
  101. 100 rm *
  102. 101 nano /etc/sysctl.conf
  103. 102 ifconfig
  104. 103 iptables --table nat --append POSTROUTING --jump MASQUERADE --source 192.168.67.0/8
  105. 104 bash -c 'iptables-save > /etc/ltsp/nat'
  106. 105 more /etc/ltsp/nat
  107. 106 nano /etc/ltsp/nat
  108. 107 nano /etc/network/interfaces
  109. 108 reboot
  110. 109 iptables-save
  111. 110 cat iptables-save
  112. 111 iptables -h
  113. 112 iptables -l
  114. 113 iptables -L
  115. 114 cd /etc/ltsp/
  116. 115 more nat
  117. 116 iptables -h
  118. 117 man iptables
  119. 118 iptables-restore < nat
  120. 119 nano /etc/network/interfaces
  121. 120 nano /etc/sysctl.conf
  122. 121 iptables --table nat --append POSTROUTING --jump MASQUERADE --source 192.168.67.0/24
  123. 122 iptables -L
  124. 123 more nat
  125. 124 cd ..
  126. 125 cd network/
  127. 126 nano interfaces
  128. 127 service networking reload
  129. 128 service networking restart
  130. 129 cd ..
  131. 130 nano /etc/ltsp/dhcpd.conf
  132. 131 nano network/interfaces
  133. 132 reboot
  134. 133 cd /etc/
  135. 134 nano ltsp/dhcpd.conf
  136. 135 ifconfig
  137. 136 nano network/interfaces
  138. 137 ifconfig
  139. 138 networkctl status
  140. 139 service systemd-networkd-resolvconf-update
  141. 140 service systemd-networkd-resolvconf-update reload
  142. 141 service systemd-networkd reload
  143. 142 service networking reload
  144. 143 networkctl status
  145. 144 nano network/interfaces
  146. 145 service networking reload
  147. 146 ltsp-update-sshkeys
  148. 147 ltsp-update-image
  149. 148 iptables -S
  150. 149 iptables-restore < /etc/ltsp/nat
  151. 150 iptables -S
  152. 151 apt install iftop
  153. 152 apt autoremove
  154. 153 iftop
  155. 154 reboot
  156. 155 iptables-restore < /etc/ltsp/nat
  157. 156 nano /etc/network/interfaces
  158. 157 iptables -S
  159. 158 service networking reload
  160. 159 history
  161. 160 ifconfig
  162. 161 iptables --table nat -A POSTROUTING -o enp1s0f1
  163. 162 iptables -A FORWARD -i enp1s0f0 -j ACCEPT
  164. 163 iptables -S
  165. 164 apt install iptables-persistent
  166. 165 cd /etc/iptables/
  167. 166 iptables-save > /etc/iptables/rules.v4
  168. 167 more rules.v
  169. 168 more rules.v4
  170. 169 nano /etc/network/interfaces
  171. 170 reboot
  172. 171 history
  173. 172 reboot
  174. 173 exit
  175. 174 ltsp-build-client --arch i386
  176. 175 cd /var/lib/tftpboot/ltsp/
  177. 176 cp amd64/lts.conf i386/
  178. 177 cd amd64/
  179. 178 ls
  180. 179 cd ..
  181. 180 cd i386/
  182. 181 ls
  183. 182 nano /etc/ltsp/dhcpd.conf
  184. 183 ltsp-chroot -h
  185. 184 ltsp-chroot --arch i368
  186. 185 cd /opt/ltsp/
  187. 186 ls
  188. 187 ltsp-chroot --arch i368
  189. 188 cd i386/
  190. 189 ls
  191. 190 chroot ./
  192. 191 ltsp-update-image --arch i386
  193. 192 ltsp-update-images
  194. 193 cd ..
  195. 194 ls
  196. 195 rm -rf amd64/
  197. 196 cd images/
  198. 197 ls
  199. 198 rm amd64.img*
  200. 199 ls
  201. 200 cd /var/lib/tftpboot/ltsp/
  202. 201 ls
  203. 202 rm -rf amd64/
  204. 203 ltsp-update-image
  205. 204 reboot
  206. 205 apt install screen
  207. 206 screen
  208. 207 screen -S ltsp-build-image
  209. 208 ls
  210. 209 cd ..
  211. 210 ls
  212. 211 htop
  213. 212 screen -r
  214. 213 htop
  215. 214 screen -r
  216. 215 ltsp-chroot
  217. 216 ltsp-update-image
  218. 217 iptables -S
  219. 218 ping ya.ru
  220. 219 ltsp-update-sshkeys
  221. 220 ltsp-chroot
  222. 221 ltsp-update-sshkeys
  223. 222 ltsp-update-image
  224. 223 nano /etc/network/interfaces
  225. 224 reboot
  226. 225 nano /etc/network/interfaces
  227. 226 iptables -S
  228. 227 nano /etc/ltsp/dhcpd.conf
  229. 228 service --status-all
  230. 229 reboot
  231. 230 ltsp-update-sshkeys
  232. 231 nano /var/lib/tftpboot/ltsp/i386/lts.conf
  233. 232 nano add-users.sh
  234. 233 chmod +x add-users.sh
  235. 234 ./add-users.sh
  236. 235 nano add-users.sh
  237. 236 ./add-users.sh
  238. 237 exit
  239. 238 tail -f /var/lib/tftpboot/ltsp/i386/lts.conf
  240. 239 exit
  241. 240 iftop
  242. 241 exit
  243. 242 iptables-save > /etc/iptables/rules.v4
  244. 243 nano /etc/iptables/rules.v4
  245. 244 reboot
  246. 245 exit
  247. 246 apt update; apt upgrade -y;
  248. 247 exit
  249. 248 cd /home/taly/
  250. 249 ls
  251. 250 cd
  252. 251 ls
  253. 252 more add-users.sh
  254. 253 wget https://releases.hyper.js/download/deb
  255. 254 ping ya.ru
  256. 255 wget https://releases.hyper.is/download/deb
  257. 256 ls
  258. 257 mv deb hyper.deb
  259. 258 apt install ./hyper.deb
  260. 259 chmod 777 ./hyper.deb
  261. 260 apt install ./hyper.deb
  262. 261 cp hyper.deb /opt/ltsp/i386/tmp/
  263. 262 ltsp-chroot
  264. 263 ltsp-update-image
  265. 264 history
  266. 265 exit
  267. 266 screen
  268. 267 iptables-save
  269. 268 service networking reload
  270. 269 iptables-apply
  271. 270 iptables-apply /etc/iptables/rules.v4
  272. 271 nano /etc/network/interfaces
  273. 272 service networking reload
  274. 273 nano /etc/network/interfaces
  275. 274 iptables-restore < /etc/iptables/rules.v4
  276. 275 service networking reload
  277. 276 name
  278. 277 uname
  279. 278 uname -v
  280. 279 history
  281. 280 apt install git
  282. 281 cd /
  283. 282 git init
  284. 283 git add .
  285. 284 git add . -v
  286. 285 git add . --verbose
  287. 286 git status
  288. 287 git add etc/
  289. 288 git status
  290. 289 git add home/
  291. 290 git add lib/
  292. 291 git status
  293. 292 apt autoremove
  294. 293 screen -r
  295. 294 apt update
  296. 295 service networking reload
  297. 296 apt update
  298. 297 nano /etc/network/interfaces
  299. 298 service networking reload
  300. 299 apt update
  301. 300 apt upgrade -y
  302. 301 git status
  303. 302 git add etc/
  304. 303 git add opt/ltsp/
  305. 304 git add opt/ltsp/i386/
  306. 305 history
  307. 306 history > /home/history
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316. add-users.sh
  317.  
  318. #!/bin/bash
  319.  
  320. for i in `seq 20 250`
  321. do
  322. NUMBER=$i
  323.  
  324. USERNAME="user$NUMBER"
  325. PASSWORD="password"
  326.  
  327. useradd -m $USERNAME
  328. echo $USERNAME:$PASSWORD | chpasswd
  329.  
  330. echo "
  331. [192.168.67.$NUMBER]
  332. LDM_AUTOLOGIN = True
  333. LDM_USERNAME = $USERNAME
  334. LDM_PASSWORD = $PASSWORD
  335. " >> /var/lib/tftpboot/ltsp/i386/lts.conf
  336.  
  337. echo "USER $NUMBER DONE"
  338. done
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345. ltsp-chroot history
  346.  
  347. mount -t proc proc /proc
  348. apt install lubuntu-desktop lubuntu-core
  349. apt install gcc firefox
  350. apt install libreoffice -y
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357. # This file describes the network interfaces available on your system
  358. # and how to activate them. For more information, see interfaces(5).
  359.  
  360. source /etc/network/interfaces.d/*
  361.  
  362. # The loopback network interface
  363. auto lo
  364. iface lo inet loopback
  365.  
  366. auto enp1s0f1
  367. iface enp1s0f1 inet static
  368. address 172.23.16.40
  369. netmask 255.255.240.0
  370. network 172.23.16.0
  371. broadcast 172.23.31.255
  372. gateway 172.23.31.254
  373. dns-nameservers 172.23.31.254
  374.  
  375. auto enp1s0f0
  376. iface enp1s0f0 inet static
  377. address 192.168.67.1
  378. netmask 255.255.255.0
  379. network 192.168.67.0
  380. gateway 192.168.67.1
  381. # up iptables-restore < /etc/ltsp/nat
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390. # Generated by iptables-save v1.6.0 on Fri Jun 22 15:07:29 2018
  391. *filter
  392. :INPUT ACCEPT [165309:187918636]
  393. :FORWARD ACCEPT [78244:82799743]
  394. :OUTPUT ACCEPT [169838:414956406]
  395. -A FORWARD -i enp1s0f0 -j ACCEPT
  396. COMMIT
  397. # Completed on Fri Jun 22 15:07:29 2018
  398. # Generated by iptables-save v1.6.0 on Fri Jun 22 15:07:29 2018
  399. *nat
  400. :PREROUTING ACCEPT [423:26662]
  401. :INPUT ACCEPT [1:78]
  402. :OUTPUT ACCEPT [3:228]
  403. :POSTROUTING ACCEPT [0:0]
  404. -A OUTPUT -p udp -m udp --dport 53 -j DNAT --to-destination 176.103.130.130:53
  405. -A OUTPUT -p tcp -m tcp --dport 53 -j DNAT --to-destination 176.103.130.130:53
  406. -A POSTROUTING -s 192.168.67.0/24 -j MASQUERADE
  407. -A POSTROUTING -o enp1s0f1
  408. -A POSTROUTING -j MASQUERADE
  409. -A POSTROUTING -j MASQUERADE
  410. COMMIT
  411. # Completed on Fri Jun 22 15:07:29 2018
  412.  
  413.  
  414.  
  415.  
  416.  
  417. /etc/ltsp/dhcpd.conf
  418.  
  419.  
  420. #
  421. # Default LTSP dhcpd.conf config file.
  422. #
  423.  
  424. authoritative;
  425.  
  426. subnet 192.168.67.0 netmask 255.255.255.0 {
  427. range 192.168.67.20 192.168.67.250;
  428. option domain-name "example.com";
  429. # option domain-name-servers 192.168.67.1;
  430. option domain-name-servers 1.1.1.1;
  431. option broadcast-address 192.168.67.255;
  432. option routers 192.168.67.1;
  433. next-server 192.168.67.1;
  434. # get-lease-hostnames true;
  435. option subnet-mask 255.255.255.0;
  436. option root-path "/opt/ltsp/i386";
  437. if substring( option vendor-class-identifier, 0, 9 ) = "PXEClient" {
  438. filename "/ltsp/i386/pxelinux.0";
  439. } else {
  440. filename "/ltsp/i386/nbi.img";
  441. }
  442. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement