2、SRX笔记及基础配置

远程基本配置

[email protected]# show | display set

set version 12.1X44.4

set system host-name SRX1

set system time-zone Asia/Shanghai

set system root-authentication encrypted-password "$1$0m2EDDUB$hW0MnI7hQFLfmFmROx02B1"

set system name-server 114.114.114.114

set system services ssh

set system services web-management http

set system ntp server 62.201.225.9

set interfaces ge-0/0/0 unit 0 family inet address 192.168.130.212/24

set interfaces ge-0/0/1 unit 0 family inet address 1.1.1.254/24

set routing-options static route 0.0.0.0/0 next-hop 192.168.130.2

set security nat source rule-set NAT-Policy from zone trust

set security nat source rule-set NAT-Policy to zone untrust

set security nat source rule-set NAT-Policy rule Trust-Untrust-Interface-NAT match source-address 1.1.1.0/24

set security nat source rule-set NAT-Policy rule Trust-Untrust-Interface-NAT then source-nat interface

set security policies from-zone trust to-zone untrust policy Permit-ALL match source-address any

set security policies from-zone trust to-zone untrust policy Permit-ALL match destination-address any

set security policies from-zone trust to-zone untrust policy Permit-ALL match application any

set security policies from-zone trust to-zone untrust policy Permit-ALL then permit

set security zones security-zone untrust host-inbound-traffic system-services ping

set security zones security-zone untrust host-inbound-traffic system-services ssh

set security zones security-zone untrust host-inbound-traffic system-services http

set security zones security-zone untrust interfaces ge-0/0/0.0

set security zones security-zone trust host-inbound-traffic system-services ping

set security zones security-zone trust host-inbound-traffic system-services ssh

set security zones security-zone trust host-inbound-traffic system-services http

set security zones security-zone trust interfaces ge-0/0/1.0

set security nat static rule-set static-nat from zone untrust

set security nat static rule-set static-nat rule rule1 match destination-address 192.168.130.199/32

set security nat static rule-set static-nat rule rule1 then static-nat prefix 1.1.1.1/32

set security nat proxy-arp interface ge-0/0/0.0 address 192.168.130.199/32

set security zones security-zone trust address-book address test 1.1.1.1/32

set security zones security-zone trust address-book address-set 1.1.1.1 address test

set applications application 3389 protocol tcp

set applications application 3389 destination-port 3389

set applications application-set 3389-3389 application 3389

set security policies from-zone untrust to-zone trust policy 1 match source-address any

set security policies from-zone untrust to-zone trust policy 1 match destination-address test

set security policies from-zone untrust to-zone trust policy 1 match application 3389-3389

set security policies from-zone untrust to-zone trust policy 1 then permit

===========================================================================================

[email protected]> show interfaces terse | match g 查看接口配置

[email protected]# show | display set   查看Set格式的配置

[email protected]# show | compare 查看待提交配置与当前运行配置的差别

[email protected]> clear system commit 清除未被提交的配置

[email protected]> show system uptime 查看系统时钟

[email protected]# commit at "2016-09-30 13:48:00"   在指定时间保存配置

[email protected]# commit comment "Only test" 为提交的配置进行说明

[email protected]> show system commit 查看提交配置的说明(包含有提交的配置说明)

[email protected]# rollback ?   查看可恢复的配置

[email protected]# rollback 9   恢复某一配置,需commit配置才生效

[email protected]# commit confirmed 确认提交配置命令(十分钟内不对配置进行确认,自动恢复配置到提交之前)

[email protected]# commit and-quit 确认并且退出

[email protected]# set system host-name My-SRX 设置主机名

[email protected]# set system name-server 114.114.114.114 设置DNS

[email protected]> show system uptime 查看时间

[email protected]# set system time-zone Asia/Shanghai 设置时区

[email protected]> set date 200808080808.08 手动设置时间

[email protected]# set system ntp server 3.asia.pool.ntp.org 设置NTP

[email protected]> show ntp associations 查看NTP

[email protected]> show ntp status 查看NTP

[email protected]> request system reboot 重启系统

[email protected]> request system power-off 关闭系统

[email protected]# set system root-authentication plain-text-password 修改root密码

[email protected]# set system login user zqb class super-user authentication plain-text-password   设置远程登录密码

恢复root密码

Loading /boot/defaults/loader.conf

/kernel text=0x894aa0 data=0x4d050+0x100b2c syms=[0x4+0x92cf0+0x4+0xd1487]

/boot/modules/libmbpool.ko text=0xd9c data=0x100

/boot/modules/if_em_vjx.ko text=0xb794 data=0x5ec+0x204 /

Hit [Enter] to boot immediately, or space bar for command prompt.

================

此时按空格键

OK boot -s

================

进入单用户模式

System watchdog timer disabled

Enter full pathname of shell or ‘recovery‘ for root password recovery or RETURN for /bin/sh: recovery

================

进入密码恢复模式

Starting CLI ...

[email protected]>

[email protected]# set system services ssh root-login deny 禁止ssh的root登录

[email protected]# set system services ssh 启用SSH

[email protected]# set system services web-management http     启动web管理

[email protected]> show version 查看版本

[email protected]> show system license 查看授权信息

[email protected]> request system license add terminal 加载授权信息(回车+Ctrl+D结束)

[email protected]> show cli history 查看历史命令

[email protected]> show system processes extensive 查看系统利用率

[email protected]> restart chassis-control gracefully 重启系统进程

set security zones security-zone trust address-book address 1.1.1.1 1.1.1.1/32

set security zones security-zone trust address-book address 1.1.1.2 1.1.1.2/32

set security zones security-zone trust address-book address-set Inside address 1.1.1.1

set security zones security-zone trust address-book address-set Inside address 1.1.1.2

set applications application 3389 protocol tcp

set applications application 3389 destination-port 3389

set applications application-set 3389-3389 application 3389

set schedulers scheduler test-scheduler daily start-time 09:00 stop-time 18:00

set schedulers scheduler test-scheduler sunday exclude

set schedulers scheduler test-scheduler saturday exclude

set schedulers scheduler one-time start-date 2016-10-18.09:00 stop-date 2016-10-18.18:00

set security policies from-zone trust to-zone untrust policy Permit-ALL scheduler-name test-scheduler

set security nat static rule-set static-nat from zone untrust

set security nat static rule-set static-nat rule rule1 match destination-address 192.168.130.199/32

set security nat static rule-set static-nat rule rule1 then static-nat prefix 1.1.1.1/32

set security nat proxy-arp interface ge-0/0/0.0 address 192.168.130.199/32

set security zones security-zone trust address-book address test 1.1.1.1/32

set security zones security-zone trust address-book address-set 1.1.1.1 address test

set applications application 3389 protocol tcp

set applications application 3389 destination-port 3389

set applications application-set 3389-3389 application 3389

set security policies from-zone untrust to-zone trust policy 1 match source-address any

set security policies from-zone untrust to-zone trust policy 1 match destination-address test

set security policies from-zone untrust to-zone trust policy 1 match application 3389-3389

set security policies from-zone untrust to-zone trust policy 1 then permit

时间: 2024-08-08 09:22:36

2、SRX笔记及基础配置的相关文章

hibernate学习笔记_基础配置

一.hibernate.cfg.xml: hbni2ddl.auto 二.搭建日志环境并配置显示DDL语句 我们使用slf接口,然后使用log4j的实现. 1.  首先引入log4j的jar包(log4j-1.2.14.jar), 2.  然后再引入slf4j实现LOG4J和适配器jar包(slf4j-log4j12-1.5.8.jar) 3.  最后创建log4j的配置文件(log4j.properties),并加以修改,只要保留 log4j.logger.org.hibernate.tool

Varnish基础配置实现动静分离web站点

由于一个web站点的程序的访问具有局部性特征:时间上的局部性:一个数据被访问过之后,可能很快会被再次访问到:空间局部性:一个数据被访问时,其周边的数据也有可能被访问到;varnish可将这部分数据缓存下来.缓存的数据存在被访问较频繁的数据可以称其为热区:缓存同样存在局部性:时效性:如果缓存空间耗尽:则采用LRU,最近最少使用算法:将过期的缓存清理掉 varnish的基本工作原理: Varnish通过类似于HTPP反向代理的方式将可以用来缓存的数据缓存下来直接响应给客户端的缓存数据,如果缓存中没有

使用Java管理Azure(1):基础配置

Azure针对Java开发人员提供了非常丰富的依赖库,开发工具,和相关插件,让你通过Java对Azure进行服务管理和开发,本文第一步先介绍如何快速的配置Java开发工具,主要针对目前比较流行的Eclipse和Intellij IDEA工具. 本文主要是基础配置的介绍,主要分为以下三个部分: 准备Azure的测试账号 准备Eclipse的Azure开发环境 准备Intellij IDEA的Azure开发环境 ? 准备Azure测试账号 首先你需要有Azure中国的测试账号.你可以通过Azure.

Hibernate笔记①--myeclipse制动配置hibernate

Hibernate 是一个开放源代码的对象关系映射框架,它对JDBC进行了非常轻量级的对象封装,使得Java程序员可以随心所欲的使用对象编程思维来操纵数据库. Hibernate可以应用在任何使用JDBC的场合,既可以在Java的客户端程序使用,也可以在Servlet/JSP的Web应用中使用,最具革命 意义的是,Hibernate可以在应用EJB的J2EE架构中取代CMP,完成数据持久化的重任. Hibernate笔记①--myeclipse制动配置hibernate

DDNS基础配置

一.简介 DDNS全名Dynamic Domain Name Server,动态域名解析服务.是由DNS和DHCP服务器组合来提供服务,简单来说就是通过DHCP服务器分配的IP地址可以动态更新到DNS服务上,免除了手动指定的麻烦. 二.平台介绍 软件包都用了centos自带源安装的 centos6.4 x64 dhcp-4.1.1-31.P1.el6.x86_64 bind-9.8.2-0.10.rc1.el6.x86_64 三.服务器端配置过程 1.DNS服务器配置 我在之前的文章中已经写过如

大话设计模式学习笔记——面向对象基础

前言 好记性不如烂"笔头"系列--大话设计模式学习笔记 目录 面向对象基础 面向对象基础 什么是类与实例 一切事物皆为对象,即所有的东西老师对象,对象就是可以看到.感觉到.听到.触摸到.尝到.或闻到的东西.准确地说,对象是一个自包含的实体,用一组可识别的特性和行为来标识.面向对象编程,英文叫 Object-Oriented Programming,其实就是针对对象来进行编程的意思.类就是具有相同属性和功能的对象的抽象集合.实例就是一个真实的对象.比如我们属于'人'类,而个人就是'人'类

          DNS的基础配置

一.DNS简介 1.DNS:Domain Name System(域名系统),是互联网上IP和域名相互解析的分布式层级结构的数据库.DNS的出现能够使用户更好的更加方便的访问互联网,不用记IP地址来访问互联网,可以通过人类更容易记住域名来访问互联网. 2.DNS是一种C/S架构的服务器,客户机用于一个名字对应的地址,而服务器是为客户机提供查询的,查询由两种机制:迭代查询和递归查询 迭代查询:一般是DNS服务器与DNS服务器之间的查询方式 递归查询:一般是客户机与服务器之间的查询方式 3.DNS是

zabbix 基础配置(四)

zabbix 基础配置(四) ============================================================================ 展示接口: ★graph:simple,custom: ★screen: ★slide show: 演示:   把之前定义的同类型的监控项,放在一屏上  1)设定图像的名称,要显示的监控项,颜色等根据自己的需要设定  2)在监测中,选择图形,查看自己定义的graphs,如下:  2.把所有的图像展现为一屏   1)

zabbix基础配置(二)

zabbix基础配置(二) ============================================================================= 概述: ============================================================================= zabbix agent安装配置:  安装配置过程 1.安装 # yum install zabbix-agent-3.0.2-1.el7.x86_64