LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 02-21-2011, 09:55 PM   #1
thinkboxx
LQ Newbie
 
Registered: Feb 2011
Posts: 8

Rep: Reputation: 0
Internal ip can't talk to the internet, PLEASE HELP


Hello guys,
I have problem.

I configured an internal fake ip 192.168.1.11 on a virtual interface of my server.
I'm running one of my postfix instances on this ip.
The problem is that postfix can't talk to external hosts on the internet when running from this internal ip 192.168.1.11
I get an error in the mail log
Feb 21 22:43:00 localhost postfix-R1/smtp[11372]: connect to 7zips.com[109.169.46.199]:25: Connection timed out

It works fine when I run postfix on real ips, but I need it to work from the internal.
I thought it should just work.
Am I missing anything?

Thanks a lot.

Last edited by thinkboxx; 02-21-2011 at 10:16 PM.
 
Old 02-21-2011, 10:24 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Is the "fake" IP on the same network as your real gateway ?
 
Old 02-21-2011, 10:33 PM   #3
thinkboxx
LQ Newbie
 
Registered: Feb 2011
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by kbp View Post
Is the "fake" IP on the same network as your real gateway ?
No, my gateway is on the same network as real IPs on this server 91.210.107.102, 91.210.107.102 which work fine
Destination Gateway Genmask Flags Metric Ref Use Iface
default 91.210.107.65 255.255.255.255 UGH 0 0 0 eth0

and the internal ip is 192.168.1.11
but its all on the same server, so I thought it should just work for outbound traffic.
Am I missing something?

Thanks
 
Old 02-21-2011, 10:42 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,324
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
Yes, you are missing something: basic subnetting. If there is no pathway from one subnet to another (usually called a gateway), two two subnets can't communicate.

Check this out--it's the best intro to subnetting that I've seen:

http://www.ralphb.net/IPSubnet/index.html
 
Old 02-21-2011, 10:47 PM   #5
thinkboxx
LQ Newbie
 
Registered: Feb 2011
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by frankbell View Post
Yes, you are missing something: basic subnetting. If there is no pathway from one subnet to another (usually called a gateway), two two subnets can't communicate.

Check this out--it's the best intro to subnetting that I've seen:

http://www.ralphb.net/IPSubnet/index.html
I understand subnetting, I'm just new to Linux
So I need to setup a default gateway for 192.168.1.* like on 192.168.1.1

But how do I setup the routing on 192.168.1.1 for this to work?

Thanks

Last edited by thinkboxx; 02-21-2011 at 10:51 PM.
 
Old 02-21-2011, 11:13 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,324
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
Okay, got you sort of.

I'm still not clear whether you need to enable a connection from the 192.168.1.x subnet to the 91.210.107.x subnet or from 192.168.1.x to the Big Wide World of the inner tubes or from 192.168.1.x to the Big Wide World via 91.210.107.x.

How to do it with your virtualization setup will depend on what virtualization engine you are using. The answer is likely specific to how your virtualization product works.

I would suggest you check the docs for that product to find out how to enable it to communicate with other networks.

If you want us to help you, you need to let us know what virtualization product you are using: VirtualBox, VMWare, or what? Different virtualization products will work in different ways.

It would probably help to know what Linux platform you are using; too much information is better than too little when it comes to trouble-shooting.

I have some experience with VirtualBox as a hobbyist and might be able to help with that, but I am not a virtualization guru by any means.
 
Old 02-22-2011, 12:02 AM   #7
thinkboxx
LQ Newbie
 
Registered: Feb 2011
Posts: 8

Original Poster
Rep: Reputation: 0
edit

Last edited by thinkboxx; 02-22-2011 at 12:07 AM.
 
Old 02-22-2011, 12:04 AM   #8
thinkboxx
LQ Newbie
 
Registered: Feb 2011
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by frankbell View Post
Okay, got you sort of.

I'm still not clear whether you need to enable a connection from the 192.168.1.x subnet to the 91.210.107.x subnet or from 192.168.1.x to the Big Wide World of the inner tubes or from 192.168.1.x to the Big Wide World via 91.210.107.x.

How to do it with your virtualization setup will depend on what virtualization engine you are using. The answer is likely specific to how your virtualization product works.

I would suggest you check the docs for that product to find out how to enable it to communicate with other networks.

If you want us to help you, you need to let us know what virtualization product you are using: VirtualBox, VMWare, or what? Different virtualization products will work in different ways.

It would probably help to know what Linux platform you are using; too much information is better than too little when it comes to trouble-shooting.

I have some experience with VirtualBox as a hobbyist and might be able to help with that, but I am not a virtualization guru by any means.
I need to communicate from 192.168.1.x to the Big Wide World.
It's not a virtual, its a dedicated server.

Thanks for your help.
 
Old 02-22-2011, 12:07 AM   #9
thinkboxx
LQ Newbie
 
Registered: Feb 2011
Posts: 8

Original Poster
Rep: Reputation: 0
Ok, here is the weird part, I just did a test
# ping -I 192.168.1.11 7zips.com
PING 7zips.com (109.169.46.199) from 192.168.1.11 : 56(84) bytes of data.
64 bytes from 109.169.46.199: icmp_seq=1 ttl=56 time=53.4 ms

So it looks like everything is working like I thought it should, because my internal ips are on the same server as real working ones.

but when I run postfix on inet_interfaces = 192.168.1.11
when I try to send mail through 192.168.1.11 I get an error in the mail log
Feb 22 00:59:09 localhost postfix-R1/smtp[13547]: connect to 7zips.com[109.169.46.199]:25: Connection timed out.

Any ideas on what could be causing this?
 
Old 02-22-2011, 12:28 PM   #10
thinkboxx
LQ Newbie
 
Registered: Feb 2011
Posts: 8

Original Poster
Rep: Reputation: 0
Angry

Also when I telnet 7zips.com 25 from my server it connects but when I do it from my house,
Connecting To 7zips.com...
Then in about 20 seconds I get
Could not open connection to the host, on port 25: Connect failed

I'm trying to connect to my other postfix server to relay email.

But I'm not sure where in the config it restricts source ips.

This is kind of driving me CRAZZZY. Please help.
 
Old 02-22-2011, 04:00 PM   #11
besolius
LQ Newbie
 
Registered: Feb 2011
Posts: 13

Rep: Reputation: 1
first of all it will NEVER work on that ip beacuse it is a prive network ip ... ergo the interface of your provider will drop every thing it sees coming from that ip .
 
Old 02-22-2011, 04:02 PM   #12
besolius
LQ Newbie
 
Registered: Feb 2011
Posts: 13

Rep: Reputation: 1
Network Address Translation
 
Old 02-22-2011, 05:11 PM   #13
thinkboxx
LQ Newbie
 
Registered: Feb 2011
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by besolius View Post
first of all it will NEVER work on that ip beacuse it is a prive network ip ... ergo the interface of your provider will drop every thing it sees coming from that ip .
I'm trying to relay this to my other postfix server
I have mynetworks = 192.168.1.11 on the receiving server but they are not on the same ISP.
I know it can talk to this server because
ping -I 192.168.1.11 7zips.com
PING 7zips.com (109.169.46.199) from 192.168.1.11 : 56(84) bytes of data.
64 bytes from 109.169.46.199: icmp_seq=1 ttl=56 time=53.4 ms

So how do I configure my receiving postfix to accept mail from my private address?

Thanks
 
Old 02-22-2011, 06:32 PM   #14
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,324
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
This is beyond my level of knowledge. Wish I could help more, but I'd just be googling and throwing links at you.

One diagnostic question,though, the answer to which might help someone else help you. Can you set up an ssh tunnel between the two machines?

http://www.linuxquestions.org/questi...onment-864231/
 
  


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
Talk Talk to introduce controversial virus alert system Jeebizz Linux - News 0 11-25-2010 10:01 AM
Hide Internal IP Adresss From Internet flankovich Linux - Newbie 5 08-22-2006 06:46 PM
accessing an internal network via internet softice2001 Linux - Networking 7 10-21-2004 12:35 PM
talk talk daemon configuration ananthkrk Red Hat 1 10-16-2004 11:45 AM
internet connection thru internal modem jaylinuxguru LinuxQuestions.org Member Intro 0 08-28-2003 02:34 PM

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

All times are GMT -5. The time now is 02:56 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