admhards...@yahoo.ca ha scritto: > Hi > I installed gambas2 in windows trought andlinux, but I wanna to conect my > database remote to my web server, but I need to change ip address to > andlinux, somebody have or had this experience before? My pc have access to > internet because have a ip in the same network but andlinux have other one > different to the network by this reason I need to change, somebody can help > me with that problem? > I have a fully functional andLinux which can access the internet, and I will describe my configuration in the hope it is useful. The andLinux system is hosted by a win2000 machine.
Foreword. I have an adsl router which uses DHCP, but I didn't want to use it because I wanted fixed addresses in my local network. Moreover my win2000 machine, when directly connected to the internet, behaves very badly (viruses this m$ crap can find I don't know where). So, I use another machine, my server (a true linux machine), as a firewall. Its only true interface, eth0, is configured with DHCP from the router, and gets addresses like 28.226.xxx.xxx. Another virtual interface "eth0:0" is set-up with the fixed local network address 192.168.223.3. The final result is that, apart from my server, no other machines are connected directly to the internet; all of them have an address of the kind 192.168.223.xxx, and use the server as a gateway. This fact should not be important to you, anyway. What it counts, is that my gateway to the internet is a router which has address 192.168.223.3. The host machine has windows 2000 - it is somehow different from xp or seven. Anyway, it has a single ethernet interface, with fixed ip = 192.168.223.15 and the gateway is of course 192.168.223.3 (the server). Then there is another virtual interface, called TAP-Colinux, which I installed using the "TAP-Win32 Adapter V8" from the andLinux package. This interface has address 192.168.23.16; no other parameters are needed. Finally, coLinux is started using these settings (from "settings.txt"): ... eth0=tuntap eth1=slirp ... Inside the andLinux system, network interfaces are setup like this: iface eth1 inet static address 10.0.2.15 gateway 10.0.2.2 netmask 255.255.255.0 iface eth0 inet static address 192.168.23.18 netmask 255.255.255.0 The interface 10.0.2.2, I suppose, is the internal one simulated by coLinux; I am not sure because I can't remember the many tries I did. Given that setup, the command "route -n" gives: Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.23.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 10.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 0.0.0.0 10.0.2.2 0.0.0.0 UG 100 0 0 eth1 All that said, I can from inside andLinux go everywhere: in my local network or the internet. If I "ssh" into the server, the server sees the connection as if it was made from the win2000 machine (and it is true!) If I open a connection to the internet, the remote machine will see the connection as if it was made from my router, using its public external address. This is normal too. The only limit with my setup is that I can not open a connection from outside andLinux to "inside" andLinux. I mean, from windows I can not telnet or ssh into andLinux, nor I can from the server. This is quite normal, because every machine acts as a firewall. I am also sure that, if I really wanted it, I could have done it. There are different ways to implement interfaces in andLinux; I chose the simplest one (or the first one which worked?). One of those ways creates a virtual "real" interface (sorry for the funny words), but the documentation says it is slow. I suppose that, if you only want to connect to a remote database, this setup is enough. Regards, Doriano ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user