LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-13-2005, 03:51 AM   #1
fibbi
Member
 
Registered: Sep 2003
Distribution: gentoo
Posts: 101

Rep: Reputation: 16
Discovering the true IP of incoming connections


So here's the problem:

I've been running a server of all kinds (apache, ssh, ftp, etc) on my comcast connection for over a year now. Recently, the modem was having trouble, so they came by and replaced it with a new one (a Scientific Atlanta "Webstar"). The problem is, unlike the previous modems, rather than connecting the router directly to the WAN, it creates a sort of mini-network, giving itself 192.168.1.1 and the router 192.168.1.10 or something. This isn't a problem for the router or for regular net stuff, but when I forward, for example, port 80 in the router to my webserver, all incoming connections show up as coming from 192.168.1.1 rather than their true WAN ip's.

Is there some way i could tweak with the kernel or the net driver or iptables or something (application-specific fixes are okay, but not as optimal since they must be done for each app) so the logs and whatnot show up correctly?

Thanks,
//BHolley
 
Old 06-13-2005, 01:19 PM   #2
nukkel
Member
 
Registered: Mar 2003
Location: Belgium
Distribution: Hardened gentoo
Posts: 323

Rep: Reputation: 30
Well, not really... once the incoming packets have passed the modem, the original address is no longer present in the packet's header, so there is no way for "internal" hosts to find it out. Of course it will be in the modem's state tables, but there's no readily available way to get to that.

If this is important to you, better try to get a "dumb" router back, like the one you had earlier.
 
Old 06-14-2005, 01:46 AM   #3
fibbi
Member
 
Registered: Sep 2003
Distribution: gentoo
Posts: 101

Original Poster
Rep: Reputation: 16
SOLVED

For anyone who has the same modem/problem, I was able to somehow get rid of this twilight zone between the router and modem by plugging my linux box directly in to the modem, powercycling the modem, and then running dhcpcd on it. I received a real (WAN) ip, then plugged it back into the router, powercycled again to clear the cache, and it worked like a charm.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot Allowing Incoming X Connections with xhost + libin88 Linux - Enterprise 1 11-09-2005 03:25 PM
Listening for incoming connections vital_101 Mandriva 9 09-20-2005 08:26 PM
restricting incoming connections, using sockets SoulSkorpion Programming 2 10-20-2004 03:15 AM
Allowing incoming connections only from a spesific country? herc Linux - Security 1 04-12-2004 02:56 AM
Sendmail and incoming connections mike_smith Linux - Networking 3 01-19-2004 06:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration