Quantcast
Channel: All SRX Services Gateway posts
Viewing all articles
Browse latest Browse all 17645

Add DMZ on single IP

$
0
0

Hi, i'm trying to add a dmz zone on lan port 2, local ip 192.168.5.180.

 

Here it is my test:

 

version 12.1X46-D55.3;
system {
host-name JuniperSRX210;
time-zone Europe/Rome;
root-authentication {
encrypted-password "password/";
}
name-server {
8.8.8.8;
8.8.4.4;
208.67.222.222;
208.67.220.220;
}
services {
ssh;
telnet;
xnm-clear-text;
web-management {
http {
interface vlan.0;
}
https {
system-generated-certificate;
interface vlan.0;
}
}
dhcp {
router {
192.168.5.1;
}
pool 192.168.5.1/24 {
address-range low 192.168.5.110 high 192.168.5.250;
}
propagate-settings ge-0/0/0.0;
}
dynamic-dns {
client address.domain.com {
server dyndns;
agent dyndns;
username name;
password "password";
interface pp0.0;
}
}
}
syslog {
archive size 100k files 3;
user * {
any emergency;
}
file messages {
any critical;
authorization info;
}
file interactive-commands {
interactive-commands error;
}
}
max-configurations-on-flash 5;
max-configuration-rollbacks 5;
license {
autoupdate {
url https://ae1.juniper.net/junos/key_retrieval;
}
}
}
interfaces {
ge-0/0/0 {
unit 0 {
family inet {
dhcp;
}
}
}
ge-0/0/1 {
unit 0 {
family ethernet-switching {
vlan {
members vlan-trust;
}
}
}
}
fe-0/0/2 {
unit 0 {
family ethernet-switching {
vlan {
members vlan-dmz;
}
}
}
}
fe-0/0/3 {
unit 0 {
family ethernet-switching {
vlan {
members vlan-trust;
}
}
}
}
fe-0/0/4 {
unit 0 {
family ethernet-switching {
vlan {
members vlan-trust;
}
}
}
}
fe-0/0/5 {
unit 0 {
family ethernet-switching {
vlan {
members vlan-trust;
}
}
}
}
fe-0/0/6 {
unit 0 {
family ethernet-switching {
vlan {
members vlan-trust;
}
}
}
}
fe-0/0/7 {
unit 0 {
family ethernet-switching {
vlan {
members vlan-trust;
}
}
}
}
at-1/0/0 {
encapsulation ethernet-over-atm;
atm-options {
vpi 8;
}
dsl-options {
operating-mode auto;
}
unit 0 {
encapsulation ppp-over-ether-over-atm-llc;
vci 8.35;
}
}
pp0 {
traceoptions {
flag all;
}
unit 0 {
point-to-point;
ppp-options {
pap {
default-password "sometext";
local-name Ispname;
local-password "password";
passive;
}
}
pppoe-options {
underlying-interface at-1/0/0.0;
client;
}
no-keepalives;
family inet {
negotiate-address;
}
}
}
vlan {
unit 0 {
family inet {
address 192.168.5.1/24;
}
}
}
}
routing-options {
static {
route 0.0.0.0/0 {
next-hop pp0.0;
metric 0;
}
}
}
security {
address-book {
global {
address server-qnap 192.168.5.60/32;
address server-netgear 192.168.5.70/32;
address server-denon 192.168.5.100/32;
address server-ps4 192.168.5.80/32;
}
}
alg {
ftp ftps-extension;
mgcp disable;
rsh;
sccp disable;
sip {
disable;
application-screen {
unknown-message {
permit-nat-applied;
}
}
traceoptions {
flag all;
}
}
}
flow {
tcp-mss {
all-tcp {
mss 1350;
}
}
}
screen {
ids-option untrust-screen {
icmp {
ping-death;
}
ip {
source-route-option;
tear-drop;
}
tcp {
syn-flood {
alarm-threshold 1024;
attack-threshold 200;
source-threshold 1024;
destination-threshold 2048;
timeout 20;
}
land;
}
}
}
nat {
source {
rule-set trust-to-untrust {
from zone trust;
to zone untrust;
rule source-nat-rule {
match {
source-address 0.0.0.0/0;
}
then {
source-nat {
interface;
}
}
}
}
rule-set dmz_to_untrust {
from zone dmz_zone;
to zone untrust;
rule dmz-source-nat-rule {
match {
source-address 0.0.0.0/0;
}
then {
source-nat {
interface;
}
}
}
}
}
destination {
pool nat-pool-qnap-51413 {
address 192.168.5.60/32 port 51413;
}
pool nat-pool-qnap-57532 {
address 192.168.5.60/32 port 57532;
}
pool nat-pool-qnap-9091 {
address 192.168.5.60/32 port 9091;
}
pool nat-pool-qnap-3306 {
address 192.168.5.60/32 port 3306;
}
pool nat-pool-netgear-21 {
address 192.168.5.70/32 port 21;
}
pool nat-pool-netgear-51414 {
address 192.168.5.70/32 port 51414;
}
pool nat-pool-denon-80-47313 {
address 192.168.5.100/32 port 80;
}
rule-set main-rule-set {
from zone untrust;
rule qnap-51413 {
match {
destination-address 0.0.0.0/0;
destination-port 51413;
protocol tcp;
}
then {
destination-nat {
pool {
nat-pool-qnap-51413;
}
}
}
}
rule qnap-57532 {
match {
destination-address 0.0.0.0/0;
destination-port 57532;
protocol tcp;
}
then {
destination-nat {
pool {
nat-pool-qnap-57532;
}
}
}
}
rule qnap-9091 {
match {
destination-address 0.0.0.0/0;
destination-port 9091;
protocol tcp;
}
then {
destination-nat {
pool {
nat-pool-qnap-9091;
}
}
}
}
rule qnap-3306 {
match {
destination-address 0.0.0.0/0;
destination-port 3306;
protocol tcp;
}
then {
destination-nat {
pool {
nat-pool-qnap-3306;
}
}
}
}
rule netgear-21 {
match {
destination-address 0.0.0.0/0;
destination-port 21;
protocol tcp;
}
then {
destination-nat {
pool {
nat-pool-netgear-21;
}
}
}
}
rule netgear-51414 {
match {
destination-address 0.0.0.0/0;
destination-port 51414;
protocol tcp;
}
then {
destination-nat {
pool {
nat-pool-netgear-51414;
}
}
}
}
rule denon-80-47313 {
match {
destination-address 0.0.0.0/0;
destination-port 47313;
protocol tcp;
}
then {
destination-nat {
pool {
nat-pool-denon-80-47313;
}
}
}
}
}
}
}
policies {
from-zone trust to-zone untrust {
policy default-permit {
match {
source-address any;
destination-address any;
application any;
}
then {
permit;
}
}
}
from-zone dmz_zone to-zone untrust {
policy vlan-dmz-to-untrust {
match {
source-address any;
destination-address server-ps4;
application any;
}
then {
permit;
}
}
}
from-zone untrust to-zone trust {
policy server-access {
match {
source-address any;
destination-address [ server-qnap server-netgear server-denon ];
application any;
}
then {
permit;
}
}
}
}
traceoptions {
file flowtrace size 10m world-readable;
}
zones {
security-zone dmz-zone {
host-inbound-traffic {
system-services {
all;
}
protocols {
all;
}
}
interfaces {
vlan.1
}
}
security-zone trust {
host-inbound-traffic {
system-services {
all;
}
protocols {
all;
}
}
interfaces {
vlan.0;
}
}
security-zone untrust {
screen untrust-screen;
host-inbound-traffic {
system-services {
all;
}
protocols {
all;
}
}
interfaces {
at-1/0/0.0 {
host-inbound-traffic {
system-services {
all;
}
protocols {
all;
}
}
}
pp0.0 {
host-inbound-traffic {
system-services {
all;
}
protocols {
all;
}
}
}
}
}
}
vlans {
vlan-trust {
vlan-id 3;
l3-interface vlan.0;
}
vlan-dmz {
vlan-id 2;
l3-interface vlan.1;
}
}

But it's rejected on CLI :

 

"The configuration could not be un-locked.

Error(s):
1) syntax error
2) error recovery ignores input until this point
3) syntax error

Warning(s):
1) vlans
2) }
3) }"

 

Someone can help me?

Thanks.


Viewing all articles
Browse latest Browse all 17645

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>