Jump to content
Not connected, Your IP: 44.192.247.185

Search the Community

Showing results for tags 'Boot;'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • AirVPN
    • News and Announcement
    • How-To
    • Databases
  • Community
    • General & Suggestions
    • Troubleshooting and Problems
    • Blocked websites warning
    • Eddie - AirVPN Client
    • DNS Lists
    • Reviews
    • Other VPN competitors or features
    • Nonprofit
    • Off-Topic
  • Other Projects
    • IP Leak
    • XMPP

Product Groups

  • AirVPN Access
  • Coupons
  • Misc

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Mastodon


AIM


MSN


ICQ


Yahoo


XMPP / Jabber


Skype


Location


Interests

Found 1 result

  1. Hi Air's, thought I'd share my setup on my Linux box. It it very basic, but does the job for me. Basic idea: Have connection to Air setup at system startup, e.g. when entering runlevel 5. Keep phase of "open" traffic as short as possible, with as few connections as possible. Solution (steps to take, no code): Create a script /etc/rc.d/vpn that reflects a service startup. Make it dependent on network startup. In the start-section of that script:remove default route of main network deviceadd route to google 8.8.8.8 via default gateway on main network deviceadd route to desired Air-Gateway(s) (e.g. europe.dns.airvpn.org) using default gatewayping until Air-Gateway can be reached (means network is up)start openvpn with desired configurationInspect route -n until tun0 is visibledelete route to google 8.8.8.8 via default gateway on main network deviceadd default route to tun0add exceptional routes for hosts which should go outside tunnel.In the stop-section, simply: killall openvpnifdown <main network device>I have also added a section "retunnel" which first ifdowns the main network, then ifups it again and calls start. Then, link that script into your desired runlevel (usually 5 for a desktop box). The result of this is that the tunnel is setup right before the graphical login. So when the user logs in, all autostarted email and web programs already go through the tunnel, as do most of the ntp and other system relevant update tasks. Therefore, you're quite opaque to your ISP . If the tunnel cannot be setup, you have not working internet connection - a sign that something is wrong! Hope that helps anyone, Lynxnoise #! /bin/sh ### BEGIN INIT INFO # Provides: vpn # Required-Start: $network $syslog # Should-Start: # Required-Stop: # Should-Stop: # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: Start VPN Tunnel # Description: Start VPN Tunnel ### END INIT INFO . /etc/rc.status rc_reset LC_ALL=en_US SLEEP=1 TIMEOUT=10 GW="192.168.100.1" VPNHOST="europe.vpn.airdns.org" case "$1" in start) echo -n "Setting up VPN" route del default dev wlan0 route add -host 8.8.8.8 gw $GW route add -host $VPNHOST gw $GW while ! ping -c 1 $VPNHOST ; do sleep 2; done # Start openvpn the way I want it. cd /root/bin /root/bin/vpnup.sh # Wait for tunnel to appear while ! route -n | grep tun ; do sleep 1; done route del -host 8.8.8.8 dev wlan0 route add default dev tun0 # Add routes to hosts to visit outside tunnel, e.g.: route add -host airvpn.org gw $GW rc_status -v ;; stop) echo -n "Stopping VPN " killall -w -SIGTERM openvpn while route -n | grep tun; do sleep 1; done ifdown wlan0 rc_status -v ;; try-restart|condrestart) if test "$1" = "condrestart"; then echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}" fi $0 status if test $? = 0; then $0 restart else rc_reset fi rc_status ;; retunnel|force-reload|restart) echo -n "Restarting: Stop..." $0 stop sleep 5 route -n echo -n "Restarting: Notunnel..." $0 notunnel sleep 5 echo -n "Restarting: Start..." $0 start $0 status rc_status -v ;; reload) $0 restart rc_status -v ;; status) echo "Checking VPN" route -n | grep "tun" rc_status -v ;; probe) ;; notunnel) ifup wlan0 rc_status -v ;; *) echo "Usage: $0 {start|stop|status|force-reload|reload|restart|reload|probe}" exit 1 ;; esac rc_exit
×
×
  • Create New...