How do I find my IP address when connecting via VPN.

I connect to my client's network via VPN. We have a UNIX box there & I would like to know IP address of my PC when I connect to UNIX box using Putty software. I checked this command - /usr/sbin/ifconfig -a and it showed me the output

lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
ce0: flags=9040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER> mtu 1500 index 2
        inet 164.56.30.11 netmask ffffff80 broadcast 164.56.30.127
        groupname ipmp-group
ce1: flags=9040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER> mtu 1500 index 3
        inet 164.56.30.10 netmask ffffff80 broadcast 164.56.30.127
        groupname ipmp-group
ce1:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        inet 164.56.30.12 netmask ffffff80 broadcast 164.56.30.127
ce2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 4
        inet 192.168.102.154 netmask ffffff00 broadcast 192.168.102.255

I am not sure which was my IP address so I tried all. Note 164.56.30.12 is UNIX box IP address. What I want to do is to open a X-windows session; for which I want to set my IP address in the DISPLAY parameter. How do I get the right IP address to open X-windows?

ifconfig is a tool to examine network interfaces on the server it's run from. Not much use for you as you are looking for the IP you are coming _from_.

I'd suggest using the 'who' command and picking your username out via a grep.

An alternative solution would be to enable PuTTY's built in X11 forwarding and use that instead. It's usually easier to do and will also encrypt your X11 data - generally a good thing.

I tried as per your suggestion. Output of who is

prtsadm    pts/2        May 23 04:33    (144.72.239.94)
prtsadm    pts/3        May 23 04:46    (144.72.239.94)

Both are the same ID "prtsadm" with which I logged in. Both have same IP address. However, upon setting up DISPLAY parm as 144.72.239.94:0.0 I am getting the same error.

Err,java.lang.InternalError: Can't connect to X11 window server using '144.72.239.94:0.0' as the value of the DISPLAY variable., com.cognos.crconfig.CRConfigFrame.<init>(CRConfigFrame.java:38)
Exception in thread "main" java.lang.NoClassDefFoundError
        at CRConfig.main(CRConfig.java:276)

Use the finger command

# ksh
# finger
Login Name TTY Idle When Where
root root dtremote 4d Mon 08:27 192.168.228.224:1
# export DISPLAY=192.168.228.224:1.0

Thanks but this time also it showed me the same IP address as last time which didn't work.

bash-2.03$ finger
Login       Name               TTY         Idle    When    Where
prtsadm  WLS Prtsadm Cognos a  pts/2       2:50 Fri 04:33  144.72.239.94
prtsadm  WLS Prtsadm Cognos a  pts/3            Fri 06:51  144.72.239.94
prtsadm  WLS Prtsadm Cognos a  pts/5         10 Fri 07:09  avpn1-b.wrn.nam.gm.c

bash-2.03$ export DISPLAY=144.72.239.94:0.0
bash-2.03$ ./crconfig.sh
Using /appl/bea81/jdk142_05/jre/bin/java
23/05/2008,07:29:18,Err,java.lang.InternalError: Can't connect to X11 window server using '144.72.239.94:3.0' as the value of the DISPLAY variable., com.cognos.crconfig.CRConfigFrame.<init>(CRConfigFrame.java:38)
Exception in thread "main" java.lang.NoClassDefFoundError
        at CRConfig.main(CRConfig.java:276)

I tried all combinations for IP address in DISPLAY parm like 144.72.239.94:0.0 144.72.239.94:1.0 144.72.239.94:2.0 144.72.239.94:3.0 but all failed.