Re: ip address ?
On 6/8/06, akonsu [EMAIL PROTECTED] wrote: hello, my openbsd machine is conected to a windows machine. the windows machine has a wireless connection and gets its ip using dhcp. the openbsd machine gets its ip from the windows machine also by using dhcp on boot. the windows machine runs cygwin X server and the openbsd machine uses its display when running various x applications. so i need to set up DISPLAY variable on openbsd to point to this screen. is there a way to automatically retrieve the ip address of the windows machine and set up DISPLAY variable in the login script on openbsd machine? also, how to handle ip renewals? So, are you saying the windows machine is the gateway for the OpenBSD machine? If that's the case, then you can just screen-scrape `route show` (there's probably a better way than screen-scraping tho). If that's not the case, then perhaps you can scrape the boot logs (I believe dhclient says something like 'bound to X.X.X.X from Y.Y.Y.Y'). Be aware though, that in either of these set ups you must trust that the dhcp server is actually your trusted windows box. -Nick
Re: ip address ?
On Wed, Jun 07, 2006 at 10:42:41PM -0700, akonsu wrote: hello, my openbsd machine is conected to a windows machine. the windows machine has a wireless connection and gets its ip using dhcp. the openbsd machine gets its ip from the windows machine also by using dhcp on boot. the windows machine runs cygwin X server and the openbsd machine uses its display when running various x applications. so i need to set up DISPLAY variable on openbsd to point to this screen. is there a way to automatically retrieve the ip address of the windows machine and set up DISPLAY variable in the login script on openbsd machine? also, how to handle ip renewals? I'm afraid neither is possible. However, I'm not sure about the proposed architecture, but if the Windows machine has at least one interface with a fixed IP address, that might be helpful. For a very dirty solution, abuse nmap, and include some actual authentication - whatever you're tunneling X over should do. (Oh, you are aware that running X over an unencrypted link is a VERY bad idea, right? Not saying you're doing so, but if you are...) Some alternatives exist; I'm not sure if a service like DynDNS.org accepts internal IP addresses (192.168.0.0/16 and the equivalent B and A classes), but that would solve some part of what you're trying to do. There are various, mostly not very robust, ways to do something similar on one's own. Joachim
Re: ip address ?
On 2006/06/08 22:16, Joachim Schipper wrote: is there a way to automatically retrieve the ip address of the windows machine and set up DISPLAY variable in the login script on openbsd machine? also, how to handle ip renewals? If this is for programs started from an ssh session to the OpenBSD box from the windows box, just use X forwarding.
Re: ip address ?
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris 'Xenon' Hanson Sent: Thursday, June 08, 2006 4:28 PM To: misc Subject: Re: ip address ? Joachim Schipper wrote: my openbsd machine is conected to a windows machine. the windows machine has a wireless connection and gets its ip using dhcp. the openbsd machine gets its ip from the windows machine also by using dhcp on boot. is there a way to automatically retrieve the ip address of the windows machine and set up DISPLAY variable in the login script on openbsd machine? also, how to handle ip renewals? I wonder if you could misuse traceroute to do this somehow? Traceroute to a known outside host that you know will have to traverse the Windows gateway, with a low max-hops value, and then parse the output of traceroute to see what the n'th hop was. -- Chris 'Xenon' Hanson | Xenon @ 3D Nature | http://www.3DNature.com/ I set the wheels in motion, turn up all the machines, activate the programs, and run behind the scenes. I set the clouds in motion, turn up light and sound, activate the window, and watch the world go 'round. -Prime Mover, Rush. Or a twist I use when connecting locally to machines whose IP address I don't know-- assign a dummy address to the MAC (which never changes) then connect to that address. Not sure how practical a solution that would be for you, but then perhaps connecting to the FQDN of the windows box, as opposed to the IP address, and let DNS figure out what that address is... maybe that would work? Or am I missing something? Dan Farrell Applied Innovations [EMAIL PROTECTED]
Re: ip address ?
thanks all for help. i can change my whole setup. what i have now is the best that i could think of. basically the problem is that my laptop's wireless card is not supported yet and i run a VMWare virtual machine under my windows and openbsd runs from a physical disk partition on this virtual machine. so openbsd connects to windows through these virtual ethernet connections installed with the VMWare player. this way openbsd can use internet. but since VM window is too small, i want to run openbsd applications on windows desktop, so i am using cygwin X. this response suggests that i can use ssh to connect to openbsd. could you give me more pointers? is there a better setup that i can use? what a mess it is with all these mutiple OS running on the same machine... ;-) konstantin 2006/6/8, Stuart Henderson [EMAIL PROTECTED]: On 2006/06/08 22:16, Joachim Schipper wrote: is there a way to automatically retrieve the ip address of the windows machine and set up DISPLAY variable in the login script on openbsd machine? also, how to handle ip renewals? If this is for programs started from an ssh session to the OpenBSD box from the windows box, just use X forwarding.
Re: ip address ?
On 2006/06/08 14:35, akonsu wrote: i can change my whole setup. what i have now is the best that i could think of. basically the problem is that my laptop's wireless card is not supported yet If it's minipci, it's usually cheap and not difficult to swap it for a ralink-based card (but check you don't have anything silly to do first, like run tpwireless on an IBM). Or you probably have the option of using plug-in wireless (USB/PC-card), which might be slightly annoying, but is probably less annoying than having to run Windows like this... but since VM window is too small, i want to run openbsd applications on windows desktop, so i am using cygwin X. this response suggests that i can use ssh to connect to openbsd. could you Yes, you can still ssh to something running on the same physical box... give me more pointers? is there a better setup that i can use? For console apps just run sshd on the OpenBSD vm and connect to it with PuTTY (or OpenSSH compiled under Cygwin, but then you have crappy Windows terminal emulation to put up with, which I mostly try and avoid - if I'm running some cygwin/windows box I usually putty to localhost for CLI). If you have GUI apps to run too, turn on X11 forwarding (in the GUI for PuTTY, or in ~/.ssh/config for OpenSSH) and it will send it over a tunnel in the SSH session and set DISPLAY for you, so you type 'xterm' in the session and it appears on your local screen. Of course by connecting from Windows to OpenBSD, you are reliant on Windows for security of those sessions...
Re: ip address ?
On 6/9/06, akonsu [EMAIL PROTECTED] wrote: i run a VMWare virtual machine under my windows and openbsd runs from a physical disk partition on this virtual machine. so openbsd connects to windows through these virtual ethernet connections installed with the VMWare player. this way openbsd can use internet. I use NAT networking with VMPlayer and this makes my Windows host with multiple *bsd guests very simple to setup. Using NAT for VMWare networking creates a 192.168.214.0/24 network with the following features: Windows host machine: 192.168.214.1 Gateway: 192.168.214.2 DNS: 192.168.214.2 Virtual Machines: 192.168.214.3-254 (I use static IPs) I don't bother with DHCP on the VMs and use static IPs (and save them in PuTTY sessions). The VMs have no problems accessing the web over any wired or wireless network on the host. I do not use any services on my host machine from the VMs, but I'm certain setting DISPLAY=192.168.214.1:0 should allow you to run X apps. - Raja