Changeset 4586


Ignore:
Timestamp:
08/05/08 11:59:52 (5 years ago)
Author:
tick
Message:

[tick] put the setting routing table script on

File:
1 edited

Legend:

Unmodified
Added
Removed
  • developers/tick/Test_env_script_GTA02A5/setneo

    r4495 r4586  
    11#!/bin/bash  
    2 if (( $UID==0 ));then 
    3         ifconfig usb0 192.168.0.200 
    4         if (( `cat /proc/sys/net/ipv4/ip_forward` == 0 )); then 
    5                 echo 1 >  /proc/sys/net/ipv4/ip_forward 
    6                 iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j MASQUERADE 
    7         fi 
    8         rm -rf ~/.ssh/known_hosts 
    9         scp /etc/resolv.conf root@192.168.0.202:/etc/ 
    10 else 
    11         echo "Please run this script as a root!!" 
     2sudo ifconfig usb0 192.168.0.200 
     3if (( `cat /proc/sys/net/ipv4/ip_forward` == 0 )); then 
     4        echo 1 | sudo tee  /proc/sys/net/ipv4/ip_forward 
     5        sudo iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j MASQUERADE 
    126fi 
     7scp /etc/resolv.conf root@192.168.0.202:/etc/ 
Note: See TracChangeset for help on using the changeset viewer.