Moved shell scripts
This commit is contained in:
parent
1c1615d3c9
commit
8fb4eca4e8
@ -0,0 +1,2 @@
|
||||
ifconfig "$CLIENT_INTERFACE" 192.168.1.1 netmask 255.255.255.255
|
||||
route add "$REMOTE_PORTAL_ADDR" -interface "$CLIENT_INTERFACE"
|
8
3_Implementation/Samples/shell/freebsd_local_routing.sh
Normal file
8
3_Implementation/Samples/shell/freebsd_local_routing.sh
Normal file
@ -0,0 +1,8 @@
|
||||
# Route packets due to the other node via the WAN interface
|
||||
pass out quick on $ext_if to $rp_ip port { 4725 }
|
||||
# Else route these packets to the client
|
||||
pass out quick on $cl_if to $rp_ip
|
||||
# Route packets due to this node locally
|
||||
pass in quick on $ext_if from $rp_ip port { 4725 }
|
||||
# Else route these packets via the tunnel
|
||||
pass out quick on $nc_if from $rp_ip
|
6
3_Implementation/Samples/shell/freebsd_remote_routing.sh
Normal file
6
3_Implementation/Samples/shell/freebsd_remote_routing.sh
Normal file
@ -0,0 +1,6 @@
|
||||
# Forward SSH traffic to the host
|
||||
pass in quick on $ext_if inet proto tcp to ($ext_if) port { 22 }
|
||||
# Forward proxy traffic to the host
|
||||
pass in quick on $ext_if inet proto udp to ($ext_if) port { 4725 }
|
||||
# Forward everything via the netcombiner interface
|
||||
pass out quick on $nc_if inet to ($ext_if)
|
2
3_Implementation/Samples/shell/linux_local_interface.sh
Normal file
2
3_Implementation/Samples/shell/linux_local_interface.sh
Normal file
@ -0,0 +1,2 @@
|
||||
ip addr add 192.168.1.1 dev "$CLIENT_INTERFACE"
|
||||
ip route add "$REMOTE_PORTAL_ADDR" dev "$CLIENT_INTERFACE"
|
10
3_Implementation/Samples/shell/linux_local_routing.sh
Normal file
10
3_Implementation/Samples/shell/linux_local_routing.sh
Normal file
@ -0,0 +1,10 @@
|
||||
# The local table has priority, so packets for the proxy will be routed correctly
|
||||
# Add a default route via the other node via the tunnel
|
||||
ip route add table 20 default via 172.19.152.2 dev nc0
|
||||
# Use this default route for outbound client packets
|
||||
ip rule add from "$REMOTE_PORTAL_ADDRESS" iif "$CLIENT_INTERFACE" table 20 priority 20
|
||||
# Add a route to the client
|
||||
ip route add table 21 to "$REMOTE_PORTAL_ADDRESS" dev "$CLIENT_INTERFACE"
|
||||
# Use this route for packets to the remote portal from the tunnel
|
||||
# Note: there must be a higher priority table for proxy packets
|
||||
ip rule add to "$REMOTE_PORTAL_ADDRESS" table 21 priority 21
|
Loading…
Reference in New Issue
Block a user