LinuxQuestions.org
Help answer threads with 0 replies.
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 07-06-2004, 11:22 AM   #16
kemplej
Member
 
Registered: Dec 2003
Posts: 235

Original Poster
Rep: Reputation: 30

Update:

I took a seperate hub. I plugged my test machine && eth1 of the firewall box into the hub. Still nothing.

Another question is:

Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:smtp
LOG all -- anywhere anywhere LOG level debug


Shouldnt there be a destination or a source address in that listing?
 
Old 07-07-2004, 12:12 AM   #17
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
So, your configuration is not how I guessed they would be in post #6?
Please, explain how they are. Even in my theoretical best, I can only give as correct instructions to set system up as is my comprehension of the network structure.
 
Old 07-07-2004, 08:24 AM   #18
kemplej
Member
 
Registered: Dec 2003
Posts: 235

Original Poster
Rep: Reputation: 30
Ok let me explain my configuration. I have 2 different networks. One is a customer's site and one is my test lab site.

Customer's Site:


[Internet] <--> [Cisco Router] <--> [Linux Box] <--> [Cisco Switch] <--> [Lan]

On the customer site the script I have posted allows us to NAT fine and whatnot. However port forwarding would not forward ports to customers. Fine...after messing with this for hours I decide to do a test lab to figure this problem out.

Test Lab Setup #1:

[Internet] <--> [Cable Router] <--> [Switch] <--> [Linux Box] <--> [Lan + Mailserver (200.0.0.0)]
^---------[Test Machine (192.168.100.7)]

Linux Box: eth0 has a ip of 192.168.100.5
eth1 has a ip of 200.0.0.250

Nat works. I thought I had set up port forwarding to forward port 25 and 80 to our local mail server on our LAN. However when I set up the test machine's gateway to 192.168.100.5 and try telnet 192.168.100.7 25 or 80 it does not work.

Test Lab Setup #2:

I thought I would try it with a second hub
[Internet] <--> [Cable Router] <--> [Switch] <--> [Lan + Mail Server (200.0.0.*)] <--> [Hub] ---> [Linux Box]
^------[Test Machine (192.168.100.7)]

Same setup as Setup#1 and no port forwarding.



Does that help?


Thanks!
 
Old 07-11-2004, 12:22 PM   #19
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
Sorry for taking so long in responsing; I was rambling in the forest for few days.

For the an other question in post #16: the "anywhere" and "anywhere" are the source and destination addresses. But as said earlier, that is not the whole truth; run with "iptables -v -L" to see more comprehensive listing (and "iptables -t nat -v -L").

For post #18:
ok, now I know how you have connected your cables. What I don't know, is why. Well, I do know that you are figuring out a problem in some other configuration, but I don't get the more concrete target.

As I tried to distinguish in post #6 (by using two concrete cases plus an open case "c"), the forwarding might mean many things. Forwarding can happen in ethernet level, routing level or protocol level and most of these can be done either with or without modifying actual "envelopes" of packages.

Back to the network description:
So, you have now in test setting #1:
Internet <- ->
{Some external IP} [cable router] {Internal IP 192.168.100.something}
<- subnet (A) 192.168.100.0/24, carried in a switch I ->*

*(A) {192.168.100.5/eth0} [linux box] {200.0.0.250/eth1} <- subnet (B) 200.0.0.0/24 carried in a same switch I -> (B) {200.0.0.254} [mail server]

*(A) {192.168.100.7} [test machine]

Are the following claims true:
1. You are allowed to set the test machine to have any settings you might ever want.
2. You are allowed to set the linux box to have any settings you might ever want.
3. You are allowed to set the mailserver to have any settings you might ever want.

About the objectives, what do you want to happen in following cases when you write:
a) testbox# telnet 192.168.100.5 25
b) testbox# telnet 192.168.100.7 25
c) testbox# telnet www.linuxquestions.org 25
(or any other arbitrary netsite)
d) testbox# telnet www.linuxquestions.org 80
(or any other arbitrary netsite)
e) testbox# telnet 200.0.0.0 25
f) linuxbox# telnet 200.0.0.0 25
g) Are these relevant questions at all? Are you trying to archive something else?

Some more general remarks.
* There is normally not much sense in connecting two nics to the same switch. It might be useful is some cases, though, eg. when your switch supports ethernet bonging/channeling so you can get double throughput, but only partially useful on routing.
* Why do you want to put the mailserver into it's own subnet in the first place? Wouldn't it be so much easier to just let the mailserver be one of the citizens (like 192.168.100.27) and setup others in the lan to use it as their mailserver. No routing, no address translation, no fuss at all.
 
Old 07-27-2004, 10:58 AM   #20
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
Got it working?
 
Old 07-27-2004, 02:37 PM   #21
kemplej
Member
 
Registered: Dec 2003
Posts: 235

Original Poster
Rep: Reputation: 30
Yes sorry for not replying...got way sidetracked.

I figured out what you meant about my ips being wrong. It seems it did not like an internal ip (192.168.1.*) on the external interface. And
our email server ip was the wrong ip which made a BIG difference

thanks for the help
 
  


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
Kinda stupid question - slackware & 64-bit processors mmarkvillanueva Slackware 14 10-26-2005 01:48 AM
Stupid question about Windows & Linux zahadumy Linux - General 6 06-01-2005 11:04 AM
IPTABLES and PortForwarding ComFox Linux - Networking 1 09-09-2002 04:37 PM
iptables and portforwarding gseven1 Linux - Networking 1 02-22-2002 10:20 AM
Portforwarding with Iptables toxic Linux - Security 2 02-14-2002 11:52 PM

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

All times are GMT -5. The time now is 10:12 AM.

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