Getting started:
Related tutorials:
| # Juniper SRX cheatsheet | |
| #Help | |
| help | |
| <command> ? | |
| #Show | |
| show configuration |
Getting started:
Related tutorials:
| ############################################################################### | |
| # The MIT License | |
| # | |
| # Copyright 2012-2014 Jakub Jirutka <jakub@jirutka.cz>. | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is |
| #!/bin/bash | |
| # A script to backup GitLab repositories. | |
| GLAB_BACKUP_DIR=${GLAB_BACKUP_DIR-"gitlab_backup"} # where to place the backup files | |
| GLAB_TOKEN=${GLAB_TOKEN-"YOUR_TOKEN"} # the access token of the account | |
| GLAB_GITHOST=${GLAB_GITHOST-"gitlab.com"} # the GitLab hostname | |
| GLAB_PRUNE_OLD=${GLAB_PRUNE_OLD-true} # when `true`, old backups will be deleted | |
| GLAB_PRUNE_AFTER_N_DAYS=${GLAB_PRUNE_AFTER_N_DAYS-7} # the min age (in days) of backup files to delete | |
| GLAB_SILENT=${GLAB_SILENT-false} # when `true`, only show error messages | |
| GLAB_API=${GLAB_API-"https://gitlab.com/api/v3"} # base URI for the GitLab API |
| #configuration of router | |
| conf t | |
| hostname "" | |
| enable secret "" | |
| line console 0 | |
| logging synchronous | |
| password "" | |
| login | |
| exit | |
| line vty 0 4 |
| #!/bin/bash | |
| ip4="192.168.168" | |
| ip6="fd00:168:168" | |
| lan="eth0" | |
| wan="eth1" | |
| 1_interfaces () { | |
| cat << EOF > /etc/sysconfig/network-scripts/ifcfg-eth0 | |
| DEVICE="eth0" | |
| NM_CONTROLLED="no" |
| echo "Обнуляем правила" | |
| iptables -X | |
| iptables -t nat -X | |
| iptables -F | |
| iptables -t nat -F | |
| echo "Блокируем весь трафик" | |
| iptables -P INPUT DROP | |
| iptables -P OUTPUT DROP | |
| iptables -P FORWARD DROP |