Computing.Net > Forums > Linux > IP behind router

IP behind router

Reply to Message Icon

Original Message
Name: skajake
Date: May 28, 2003 at 18:34:33 Pacific
Subject: IP behind router
OS: Gentoo 1_4rc
CPU/Ram: duron 600/768mb
Comment:

Scenario:
Running my linux machine through a switch connecting to the internet through a WinXP box running Internet Connection Sharing.

Question:
How can I get my linux machine the external ip address that the WinXP is using.

I will:
Run any hacked up program/ip tunnel/whatever it takes.

Looking for:
Any suggestions


Report Offensive Message For Removal

Response Number 1
Name: egkenny
Date: May 28, 2003 at 20:40:58 Pacific
Subject: IP behind router
Reply: (edit)

I do not understand why you are using internet sharing when you have a router and switch. Why not connect the Linux box directly to the switch. The easiest thing then is to set up the router for DHCP and let it assign IP addresses for your computers. You then set up both Windows XP and Linux for DHCP. Sometimes you also have to set the Nameserver entries also. BTW, you can also use static IP addresses if you wish.

I have have been doing it this way for several years. I have a Linksys BEFSR41 Router/Switch (4-port). I have three computers connected to the router/switch:
1) Windows XP, RedHat 8.0 & RedHat 9
2) Windows 98
3) Windows 98 & RedHat 7.3
I have used both DHCP and static IP addresses with this setup.


Report Offensive Follow Up For Removal

Response Number 2
Name: HippieJoe
Date: May 28, 2003 at 23:56:34 Pacific
Subject: IP behind router
Reply: (edit)

i agree with eqkenny, however, i am not quite sure why you want your internal linux box to "have" external xp box's ip address in the first place.

i am guessing you want to run a web server or something similar on your internal box but have it be accessible via teh wan address???

if this is the case i would simply use port forwarding. for example: apache is on port 80. so whatever traffic is comming into your wan, the xp box would then forward it directly to your 192.168.1.x address. you can do the same thing with any port depending on the service you want.

i have never set up xp to share connections, but i imagine it has some functionality like this. i use iptables on my linux box...this has forwarding capability. also, my linksys router/switch, has a nice web gui to realy simplify things.

well hope this helps...or else i was totaly off track. good luck.

hippiejoe

and if you know anything about raids check out my post in general hardware...guaranteed to be fun!!!


Report Offensive Follow Up For Removal

Response Number 3
Name: Johanovitch
Date: May 30, 2003 at 13:29:11 Pacific
Subject: IP behind router
Reply: (edit)

I think he means that his XP-box is connected to the internet, then useing Internet connection sharing and his switch is connected to the second networkcard of his XP-box. Then his linuxbox is connected to the switch.

Am I right skjake?

Does your XP-box have a static IP? I guess not, otherwise you wouldn`t be asking this question.
Does it have a hostname? I don`t know if this is the case, as I never worked with dynamic IP`s. If So, just ping the hostname.

Johan


Report Offensive Follow Up For Removal

Response Number 4
Name: trav04
Date: June 3, 2003 at 19:27:10 Pacific
Subject: IP behind router
Reply: (edit)

Hey, I am also trying to do this also, I have Windows XP Pro, setup on Apache 2.0.?.? something like that, and i am hosting a website, i also want to forward my port from Apache onto the Linux (Red Hat) system and run a website on it ..
Useing ::. Cable = dhcp
Internet Sharing
Hub 16port (doesnt matter)
XP Pro on Internet Sharing
Linux hooked into Hub on Static IP
i just need to know how to setup Apache to Forward the port or what ever it might take, and thanks in advace. Travis, email me please



Report Offensive Follow Up For Removal

Response Number 5
Name: Johanovitch
Date: June 5, 2003 at 05:25:18 Pacific
Subject: IP behind router
Reply: (edit)

All I can say is that I would do it the other way round: connect the linuxbox to the internet and install and configure iptables to forward traffic to the intranet behind the linuxbox. If you run apache on the linuxbox, the website will be accessible to everybody.


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: IP behind router

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software