Transparent Proxy Week 3 Report

This week I was creating virtual network.  First of all, I need to make server VM to use proxy from university's network. For this I used tunnelling,  basically what I did was following: from server VM I ssh to lab's server  and tunnel ports so server VM could get internet with proxy from university's network. Command looks like this:

ssh server -p 2222 -i Aset -L 8080:10.1.1.10:3128 -N

To automate this somehow I tried to use autossh but couldn't get it, so I just used screen. GNU Screen is a software application that can be used to multiplex several virtual consoles, allowing a user to access multiple separate terminal sessions inside a single terminal window or remote terminal session. Some useful commands:

  • screen - to open new screen;

  • screen -ls - to show currently open screens;

  • screen -r [screen ID] - to continue that session;

  • Ctrl + A then D - quit from screen leaving it at background;

  • Ctrl + D - close all screens.

The next step was to install DNS server on my server machine (internal ip 192.168.56.2; external ip 10.0.2.15). First install Bind DNS server:

> > sudo zypper install bind > >

Then configure it in  /etc/named.conf:

> > # create newoptions {directory "/var/lib/named"; dump-file "/var/log/named_dump.db"; statistics-file "/var/log/named.stats";# for security setting below # query range (set if you use only in LAN)
allow-query { localhost; 192.168.56.2/24; };# transfer range (set only for secondary DNS)
allow-transfer { localhost; 192.168.56.2/24; };

# recursion range (set if you use only in LAN)
allow-recursion { localhost; 192.168.56.2/24; };
};

# here is the section for internal informations
view "internal" {

match-clients {
localhost;
192.168.56.2/24;
};

zone "." IN {
type hint;
file "root.hint";
};

# define your domain info for internal
zone "sstlab" IN {
type master;
file "sstlab.lan";
allow-update { none; };
};

# define your IP info for internal *note
zone "2.56.168.192.in-addr.arpa" IN {
type master;
file "2.56.168.192.db";
allow-update { none; };
};
zone "localhost" IN {
type master;
file "localhost.zone";
};

zone "0.0.127.in-addr.arpa" IN {
type master;
file "127.0.0.zone";
};
};

# here is the section for external informations
view "external" {
match-clients {any;};

zone "." IN {
type hint;
file "root.hint";
};

# define your domain info for external
zone "sstlab" IN {
type master;
file "sstlab.wan";
allow-update { none; };
};

# define your IP info for external *note
zone "15.2.0.10.in-addr.arpa" IN {
type master;
file "15.2.0.10.db";
allow-update { none; };
};
};

include "/etc/named.conf.include";


>
> </blockquote>




Then I installed DHCP server.




<blockquote>

>
> sudo zypper install dhcp-server
>
> </blockquote>


And configure it in /etc/dhcpd.conf``


<blockquote>option domain-name-servers 192.168.56.2;
ddns-update-style none;
ddns-updates off;
log-facility local7;
subnet 192.168.56.0 netmask 255.255.255.0 {
option routers 192.168.56.2;
range 192.168.56.3 192.168.56.254;
default-lease-time 43200;
max-lease-time 86400;
}</blockquote>


So know my server machine gives IP address to the client machine automatically and also client has an access to the internet via server's connection.

Comments