09
Dec
09

getting backtrack to work with ics



As far as I know, Backtrack4 pre-final is not one of the distributions that can autoconfigure the Internet access, if you’re connecting through a Windows’s station Internet Connection Sharing. That’s why, a while ago I wrote some scripts to setup that for me. I’m gonna post them here, so that I can have access to them in an easy way, and so that other people could benefit from them. Maybe they’ll help you configure your distro to work with ICS:

Script 1:


import os

target_file = "/etc/network/interfacesx"
fh = open(target_file,"w")

interface_string = """
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
	address 192.168.0.2
	netmask 255.255.255.0
	network 192.168.0.0
	broadcast 192.168.0.255
	gateway 192.168.0.1
"""
fh.write(interface_string)
fh.close() 

and script 2:


resolve_path = "/etc/resolv.conf"
fh = open(resolve_path)
lines = fh.readlines()
fh.close()
fh = open(resolve_path,"w")
for line in lines:
	fh.write("#%s" % line)
fh.write("nameserver 192.168.0.1")
fh.close() 

Run them in any order you please. However, to get the connection to work, you have to also run this:

/etc/init.d/networking restart

Advertisements

0 Responses to “getting backtrack to work with ics”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Blog Stats

  • 221,399 hits

%d bloggers like this: