|
Create the stateful firewall rule and apply it to inbound traffic.
Use any unique string for the rule name.
|
- From the top of the configuration hierarchy, click Services>Stateful firewall.
- Next to the rule, click Add new entry.
- In the Rule name box, type the name of the rule.
- From the Match direction list, select Input.
|
- 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.
Use any unique string for the term name.
|
- Next to Term, click Add new entry.
- In the Term name box, type the name of the term.
- Click From.
- Next to Destination address, click Add
new entry.
- From the address list, select Enter specific
valuet.
- In the Address box, type the IP address of the local tunnel
endpoint, in dotted decimal notation, and click OK.
- Next to Source address, click Add new entry.
- From the address list, select Enter specific
value.
- In the Address box, type the IP address of the remote tunnel
endpoint, in dotted decimal notation, and click OK.
- Next to Applications, click Add new entry.
- In the Application name box, type junos-ipsec-esp,
and click OK.
- Next to Applications, click Add new entry.
- In the Application name box, 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.
- From the Designation list, select Accept,
then 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.
Use any unique string for the term name.
|
- From the top of the configuration hierarchy, click Services>Stateful firewall>Rule>rule-name
- Next to Term, click Add new entry.
- In the Term name box, type the name of the term.
- Click Then.
- From the Designation list, select Discard.
- Click OK.
|
- 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
|