|
Create the stateful firewall rule and apply it to inbound traffic.
|
- From the top of the configuration hierarchy, click Services>Stateful firewall.
- In the rule field, click Add new entry.
- In the Rule name box, type the name of the rule. It can
be any unique string.
- In the Match direction field, select Input from
the drop-down menu.
|
- From the top of the configuration hierarchy, enter
edit services stateful-firewall
- Create the firewall rule and apply it to input traffic:
set rule rule-name match-direction input
|
|
Create the firewall term to match only desired traffic.
|
- In the Term field, click Add new entry.
- In the Term name box, type the name of the term. It can
be any unique string.
- Click From.
- In the Destination address field, click Add
new entry.
- In the address field, select Enter specific
value from the drop-down menu.
- In the Address box, type the IP address of the local tunnel
endpoint, in dotted decimal notation, and click OK.
- In the Source address field, click Add
new entry.
- In the address field, select Enter specific
value from the drop-down menu.
- In the Address box, type the IP address of the remote tunnel
endpoint, in dotted decimal notation, and click OK.
- In the Applications field, click Add new
entry.
- In the Application name field, type junos-ipsec-esp,
and click OK.
- In the Applications field, click Add new
entry.
- In the Application name field, type junos-ike,
and click OK.
|
- Create the firewall term and match all packets with
a destination address that matches the local tunnel endpoint:
set term term-name from destination-address local-tunnel-end-point-address
- Match all packets with a source address that matches the
remote tunnel endpoint:
set term term-name from source-address remote-tunnel-end-point-address
- Match all packets using IPSec as an application protocol:
set term term-name from applications junos-ipsec-esp
- Match all packets using IKE as an application protocol:
set term term-name from applications junos-ike
|
|
Configure the firewall term to accept only desired traffic.
|
- Click OK to return to the Term
name page, and click Then.
- In the Designation field, select Accept from
the drop-down menu, select the Yes box.
- Click OK.
|
Set the match action to accept:
set term term-name then accept
|
|
Create the firewall term to reject all other traffic.
|
- From the top of the configuration hierarchy, click Services>Stateful firewall>Rule>rule-name
- In the Term field, click Add new entry.
- In the Term name field, type the name of the term. The
name can be any unique string.
- Click Then.
- In the Designation field, select Discard from
the drop-down menu.
|
- From the top of the configuration hierarchy, enter
edit services stateful-firewall rule rule-name
- Configure a term to discard all traffic:
set term term-name then discard
|