All pastes #581200 Raw Edit

Mine

public text v1 · immutable
·published 2007-06-21 12:28 UTC
rendered paste body
#!/bin/bash

VPNEXTIP="75.126.235.235" # openvpn external ip of tunnel
DEFAULTGW="10.10.1.254" # default gateway for existing network
PROXY="10.50.1.205" # council proxy ip

# vpn must route out over the existing default gateway
route add -host $VPNEXTIP dev eth0
route add -host $VPNEXTIP dev eth0 gw $DEFAULTGW
# council proxy must route out over the existing default gateway
route add -host $PROXY dev eth0
route add -host $PROXY dev eth0 gw $DEFAULTGW

# enable ip routing
echo 1 >/proc/sys/net/ipv4/ip_forward

# perform nat on external interface
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE