Skip to content

Instantly share code, notes, and snippets.

@dbrosy
Created February 19, 2018 06:27
Show Gist options
  • Save dbrosy/1e33aaae0195abd754dfce08f6297cb5 to your computer and use it in GitHub Desktop.
Save dbrosy/1e33aaae0195abd754dfce08f6297cb5 to your computer and use it in GitHub Desktop.
# PPTP
configure
# -------------------------------------
# Routing Tables - Static Routes
# -------------------------------------
# pppoe0
set protocols static table 1 interface-route 0.0.0.0/0 next-hop-interface pppoe0
# pptpc0
set protocols static table 2 interface-route 0.0.0.0/0 next-hop-interface pptpc0
# -------------------------------------
# Firewall modify policy
# -------------------------------------
# pppoe
set firewall modify SOURCE_ROUTE rule 10 description 'traffic eth1 to WAN'
set firewall modify SOURCE_ROUTE rule 10 source address 192.168.1.0/24
set firewall modify SOURCE_ROUTE rule 10 modify table 1
# pptpc0
set firewall modify SOURCE_ROUTE rule 20 description 'traffic from eth1.100 to VPN'
set firewall modify SOURCE_ROUTE rule 20 source address 192.168.99.0/24
set firewall modify SOURCE_ROUTE rule 20 modify table 2
# -------------------------------------
# Attach firewall policy to Interface
# -------------------------------------
# pppoe
set interfaces ethernet eth1 vif 1 firewall in modify SOURCE_ROUTE
# pptpc0
set interfaces ethernet eth1 vif 100 firewall in modify SOURCE_ROUTE
commit;exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment