Click to See Complete Forum and Search --> : IP addresses.......
ScRapZ_1
11-02-2001, 07:27 AM
A bit of a hard question to describe really... but here we go!
I have several computers hooked up in the house which all connect o the internet thru a LAN connection. And I also have a seperate linux box which I use as an ftp server and every now and then a web server. I use these mainly for LAN's, but I want to get it ono the net.
Question: what IP address and port number do I use to identify this linux box on the net. Eg: My inernet server box, when connected, has ip address 111.222.333.444 and is named 'server' and my linux box connects thru this. ('linuxbox') What IP do I call to connect to an ftp server... of many things.
None of that probably made sense... but I'm sure theres SOMEONE out there who knows what I'm on about...
TTFN,
ScRapZ_1 :p
I'm not quite sure what you mean, but...
Should your ISP give you the ip address to your machine, either by DHCP or you writing it manually? In this case you can connect to your machine either using the ip address or the "computer_name.isp.co". Port comes from the software you are using as ftp (normal 21/ssh 22) or http (normal 80/https 443).
Nailz
11-02-2001, 10:11 AM
There's PLENTY of info in this forum on this and I'm sure quite a few NHF's but here goes....
I'm assuming that your 1st linux box shares it's net connection with your 2nd? (and 3rd, 4th, so on).
I'll explain my setup (which is pretty common) and you can draw your answers from that.
BoxA running Linux has 2 NICs:
eth0 - setup as DHCP and is connected directly to my cable modem (insert ISP here)
eth1 - has an internal ip of 10.0.0.1 and is connected to a hub.
BoxB running 'Whatever you want' has 1 NIC:
It is set as
IP - 10.0.0.2
Sub- 255.255.255.0
GW - 10.0.0.1
Also, set your DNS servers on the 2nd box to those your ISP provides. Setup ipforwarding/ipmasquerading on BoxA. You can use a program such as PMFirewall (www.pmfirewall.com) to easily setup the ipchains scripts to allow this. At some point you'll want to utilize iptables depending on which kernel you're using, but this is a start.
Now both machines are online at the sametime. If you are hosting a Web Server/FTP server/Whatever on the internal Box (BoxB), then you just need to read up on ipchains (or iptables if you go that route) on Port Forwarding and redirecting. This way, for example, any HTTP request that comes in to BoxA (port 80 by default)will be automatically forwarded to BoxB and so on.
Hope that sheds some light on it.
ScRapZ_1
11-03-2001, 05:41 AM
Well, that kinda didnt help... since my computer that is connected thru the net is a win2k box (gasp) but that is something i cant change.
But using Nails' example...
BoxA: Win2k
Internal IP: 192.168.0.1
Sub: 255.255.255.0
IP assigned by ISP: Well... its a dialup
BoxB: RH 7.0
Internal IP: 192.168.0.200
Sub: 255.255.255.0
Gateway: 192.168.0.1
...I have an FTP service on BoxB which I can connect through the internal network but I want it to get onto the net. What do I do?
...does this help?
TTFN,
ScRapZ_1 :p
[ 03 November 2001: Message edited by: ScRapZ_1 ]
Hmm... i suppose you have enabled the win2k box to allow internet connection to be shared by other computers? Another thing is to check what the route ("route -n" doesn't resolve names for ips) command tells you.
Nailz
11-05-2001, 10:26 AM
Well that changes things a bit... why didn't you say that in the first place??
Windows 2000 has ICS (Internet Connection Sharing). That means that with 2 NICS (or a NIC and a modem) you can set one up to be shared (the external one). The 2nd will automatically be assigned 192.168.0.1 and all connected clients (everyone on your internal network) will be assigned an IP dynamically. Set them up for DHCP. That will solve Internet access within the LAN.
As for using an Internal FTP or Web server?? Hmm. You're going to have to look around for an application (perhaps a proxy/firewall application?) that can forward your ports. Try www.tucows.com (http://www.tucows.com) or www.davecentral.com (http://www.davecentral.com) for starters.
Let me know if you find a good one.
Of course, you can always reverse your roles and use your Red Hat box to share. Then port forwarding would be done by ipchains/iptables.
ScRapZ_1
11-06-2001, 06:56 AM
Yeah... that would be the LOGICAL thing to do, wouldnt it? But the boss doesnt want it that way. And what he says, goes... unfortunatly.
Maybe I can just switch things around a bit, and maybe he wont notice. LOL. Yeah right :)
Thanks Nails, I'll see how I go.
TTFN,
ScRapZ_1 :p
Nailz
11-06-2001, 04:22 PM
You're boss doesn't want what ???
- Your Windows box to be setup properly?
- Your internal network setup as DHCP?
- Your linux box doing the routing?
If he INSISTS on having the Windows box share it's internet connection AND won't allow you to use Microsoft's built-in ICS mechanism, then you will need a 3rd party utility. That will cost money.
So you have 4 Options:
1 - Use the Linux Box as the router and setup the internal network as DHCP
Pros: Cheap to setup (free), Most Secure, Easiest to manage.
Cons: A little bit of a learning curve to get the proper ipforwarding/masqurading setup and internal DHCP server (but worth the trouble)
2 - Use the Linux Box as the router and use Static IP's internally.
Pros: Cheap to setup (free), Most Secure
Cons: Same as above minus learning the DHCP side, plus you'll have to manage each client.
3 - Use the Win2K box with ICS.
Pros: Easy to setup on all levels.
Cons: Your Windows box is essentially your firewall. Not as secure. Eeek.
4 - Use the Win2K box with a 3rd party app for Internet Connection Sharing
Pros: It will make the pointy-haired-boss happy because its probably the only thing he understands (IMHO)
Cons: Not as secure plus the extra cost involved in a 3rd party application.
Have Fun.
ScRapZ_1
11-07-2001, 07:44 AM
LOL...
...thats all :D
TTFN,
ScRapZ_1 :P
Vagrant
11-08-2001, 08:01 AM
use ics, if you're boss is so dead set against this, honestly, he is too stupid to use a computer and should choose another career path. ok once you have win2k using ics, make sure rh is actaully using the win2k box as ur gateway, use 'route' it should show the "Gatway" if it just shows an ' * ' just use the command 'route add default gw 192.168.0.1' or whatever the ip is, then should be able to get on the net without a problem, good luck ..
*vagrant
ScRapZ_1
11-09-2001, 06:38 AM
We're kinda getting off track here.
I've got the Internet sharing up and running no worries, I've had that since the start. But what really need done is IP forwarding (I think this is the name, I've never done it before) to give a computer on the network an IP address suitable for the internet. I've been looking around, and nothing is all simple, its all a learning experience for me.
Me goes now. :rolleyes:
TTFN,
ScRapZ_1 :p
Xsecrets
11-09-2001, 11:48 AM
this is really pretty easy. I am assuming you are using ICS on the win2k box to share the internet connection. If you look through the properties (I could look and find exactly where but I'm too lazy) you will find a place where you can forward services. what you want to do is forward the ftp service (assuming your ftp server is using the standard port 21) to the internal ftp server then when you are joe blow out on the net you just ftp to the ip address of the dialup and it will get forwarded to the linux ftp server.
Now concidering this is a dialup your ip will probably change all the time so I would suggest dynip or something simillar that will put a domain name to your ip address whenever you dial up. Then you just ftp to the domain name and get the linux box.