Networking Forums

Networking Forums > Computer Networking > Linux Networking > Help needed on ip forwarding

Reply
Thread Tools Display Modes

Help needed on ip forwarding

 
 
Daniel
Guest
Posts: n/a

 
      09-29-2004, 02:10 PM
Here's my current network.

[ADSL modem] -- [ router ] -- [ private LAN ] -- [ my computer ]

My modem gets an external IP from the ISP.

My computer uses an internal IP (192.168.0.*) assigned by the router.


What I'd like is to set up a virtual interface and ip
forwarding/masquerading to 'trick' my
computer into thinking that it's using the external IP address instead.

This is because certain peer to peer clients work better if they 'think'
they have
an external IP address to give to other client on their networks. My
computer is set as
the DMZ on the router, so any inbound connection will pass through to my
computer.

The issue is now how to trick all the applications into thinking they're
using the
external IP address on the virtual interface (I have two physical
interfaces on my
computer if it makes a difference).

I managed to set the external IP on the virtual interface, but got stuck
setting up
the routing tables.

Any help in getting this setup to work would be greatly appreciated.

Thanks in advance,
Daniel
 
Reply With Quote
 
 
 
 
Bernhard Kastner
Guest
Posts: n/a

 
      09-29-2004, 02:24 PM
Daniel schrieb:
> Here's my current network.
>
> [ADSL modem] -- [ router ] -- [ private LAN ] -- [ my computer ]
>
> My modem gets an external IP from the ISP.
>
> My computer uses an internal IP (192.168.0.*) assigned by the router.
>
>
> What I'd like is to set up a virtual interface and ip
> forwarding/masquerading to 'trick' my
> computer into thinking that it's using the external IP address instead.
>
> This is because certain peer to peer clients work better if they 'think'
> they have
> an external IP address to give to other client on their networks. My
> computer is set as
> the DMZ on the router, so any inbound connection will pass through to my
> computer.
>
> The issue is now how to trick all the applications into thinking they're
> using the
> external IP address on the virtual interface (I have two physical
> interfaces on my
> computer if it makes a difference).
>
> I managed to set the external IP on the virtual interface, but got stuck
> setting up
> the routing tables.
>
> Any help in getting this setup to work would be greatly appreciated.
>
> Thanks in advance,
> Daniel


what kind of router is your router? is it a little box that gave you
your isp or is it a configurable computer?
there are two possibilities: If it is a computer, just set
/proc/sys/net/ipv4/ip_forward to 1 if you really want everything to be
forwarded, which is not recommended for some security reasons.
The second possibility is, you have a little Router, that is no
"computer" and is configurable. In that case, you just have to forward
PORTS, not IPs. that's a big difference. If you want to run eMule, you
have to forward the specific port (both UDP and TCP) to your computer
and nothing more.

But be careful with forwarding ports: some ports are used by malicious
software that wants to enter your network and if your ISP doesn't allow
a server or even a network to be set up by you, you can be detected by
the ISP, when you're running services on a specific port, that is
forwarded. (So never ever forward Port 80 if you're not allowed to runa
a webserver)
 
Reply With Quote
 
Daniel
Guest
Posts: n/a

 
      09-29-2004, 02:54 PM
Bernhard Kastner wrote:
> Daniel schrieb:
>
>> Here's my current network.
>>
>> [ADSL modem] -- [ router ] -- [ private LAN ] -- [ my computer ]
>>
>> My modem gets an external IP from the ISP.
>>
>> My computer uses an internal IP (192.168.0.*) assigned by the router.
>>
>>
>> What I'd like is to set up a virtual interface and ip
>> forwarding/masquerading to 'trick' my
>> computer into thinking that it's using the external IP address instead.
>>
>> This is because certain peer to peer clients work better if they
>> 'think' they have
>> an external IP address to give to other client on their networks. My
>> computer is set as
>> the DMZ on the router, so any inbound connection will pass through to
>> my computer.
>>
>> The issue is now how to trick all the applications into thinking
>> they're using the
>> external IP address on the virtual interface (I have two physical
>> interfaces on my
>> computer if it makes a difference).
>>
>> I managed to set the external IP on the virtual interface, but got
>> stuck setting up
>> the routing tables.
>>
>> Any help in getting this setup to work would be greatly appreciated.
>>
>> Thanks in advance,
>> Daniel

>
>
> what kind of router is your router? is it a little box that gave you
> your isp or is it a configurable computer?
> there are two possibilities: If it is a computer, just set
> /proc/sys/net/ipv4/ip_forward to 1 if you really want everything to be
> forwarded, which is not recommended for some security reasons.
> The second possibility is, you have a little Router, that is no
> "computer" and is configurable. In that case, you just have to forward
> PORTS, not IPs. that's a big difference. If you want to run eMule, you
> have to forward the specific port (both UDP and TCP) to your computer
> and nothing more.
>
> But be careful with forwarding ports: some ports are used by malicious
> software that wants to enter your network and if your ISP doesn't allow
> a server or even a network to be set up by you, you can be detected by
> the ISP, when you're running services on a specific port, that is
> forwarded. (So never ever forward Port 80 if you're not allowed to runa
> a webserver)




I'm using a little box as my router. I'm quite comfortable with setting my
computer as the DMZ in the LAN.

what I need is for my computer to use the external IP as its own IP on
one of its (virtual) interfaces.

Case in point is ICQ. ICQ reports its own internal IP address if it is
in a LAN.
Then it's impossible for someone outside the LAN to initiate a direct
connection.
But if ICQ is using the virtual interface with the external IP address,
it will
think it is on the 'outside' and will report the external IP so that
someone
outside can initiate the direct connection (since my computer is the DMZ).

My main problem now is getting the routing tables correctly configured.
 
Reply With Quote
 
Bernhard Kastner
Guest
Posts: n/a

 
      09-29-2004, 03:58 PM
Daniel schrieb:
>
>
> Case in point is ICQ. ICQ reports its own internal IP address if it is
> in a LAN.
> Then it's impossible for someone outside the LAN to initiate a direct
> connection.
> But if ICQ is using the virtual interface with the external IP address,
> it will
> think it is on the 'outside' and will report the external IP so that
> someone
> outside can initiate the direct connection (since my computer is the DMZ).
>
> My main problem now is getting the routing tables correctly configured.


Your computer doesn't need to have to external IP, this wouldn't work
anyway. Everything you have to do is to set up your router to forward
Packets that are incoming from ANY adress at Ports x and y to the
internal Ip of your computer
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How-To needed: Port Forwarding (Routing?) =?Utf-8?B?WWF2dXogQm9nYXpjaQ==?= Windows Networking 2 01-19-2005 03:23 PM
help needed: router ip port forwarding Beowulf Network Routers 5 11-01-2004 03:18 PM
Port Forwarding Help Needed EdG Broadband Hardware 4 07-09-2004 09:17 PM
Port forwarding not needed... Julia Goolia Linux Networking 1 05-06-2004 05:32 PM
HELP NEEDED!! Do I have a router that needs taken back. Please. Any information is much needed. newbie Windows Networking 0 09-28-2003 04:53 PM



1 2 3 4 5 6 7 8 9 10 11