source: OpenRLabs-Git/deploy/rlabs_installer/08_iptables.sh

qndtest
Last change on this file was 42bd667, checked in by David Fuertes <dfuertes@…>, 3 years ago

Historial Limpio

  • Property mode set to 100644
File size: 1.4 KB
Line 
1#!/bin/bash
2. utils/package_manager.sh
3
4echo "+------------------------------------------+"
5echo "|                                          |"
6echo "|         Installing iptables              |"
7echo "|                                          |"
8echo "+------------------------------------------+"
9
10$pkg_mng --yes install iptables
11
12echo "+------------------------------------------+"
13echo "|                                          |"
14echo "|         Installing at program            |"
15echo "|                                          |"
16echo "+------------------------------------------+"
17
18$pkg_mng --yes install at
19
20
21
22
23echo "+------------------------------------------+"
24echo "|                                          |"
25echo "|         Config IP Forward                |"
26echo "|                                          |"
27echo "+------------------------------------------+"
28
29
30sed -i s/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/g /etc/sysctl.conf
31sed -i s/#net.ipv4.ip_forward=0/net.ipv4.ip_forward=1/g /etc/sysctl.conf
32
33echo 1 > /proc/sys/net/ipv4/ip_forward
34
35
36echo "+------------------------------------------+"
37echo "|                                          |"
38echo "|         Config sudo iptables, at         |"
39echo "|                                          |"
40echo "+------------------------------------------+"
41
42echo "www-data ALL=(ALL) NOPASSWD: /sbin/iptables" >> /etc/sudoers
43echo "www-data ALL=(ALL) NOPASSWD: /usr/bin/at" >> /etc/sudoers
Note: See TracBrowser for help on using the repository browser.