LinuxQuestions.org
Review your favorite Linux distribution.
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-22-2003, 10:03 AM   #16
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79

What does your nat table look like:
iptables -t nat -n -L
 
Old 06-22-2003, 10:11 AM   #17
robiewp
LQ Newbie
 
Registered: Feb 2003
Distribution: Redhat 8.0, Slackware
Posts: 25

Original Poster
Rep: Reputation: 15
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 to:192.168.0.2
DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 to:192.168.0.2
DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpts:2300:2400 to:192.168.0.2
DNAT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpts:2300:2400 to:192.168.0.2

Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- 0.0.0.0/0 0.0.0.0/0

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
 
Old 06-22-2003, 10:16 AM   #18
robiewp
LQ Newbie
 
Registered: Feb 2003
Distribution: Redhat 8.0, Slackware
Posts: 25

Original Poster
Rep: Reputation: 15
FYI i've checked the actual connectivity. The windows system can talk to eth1, but not to eth0 or the world. The linux system via eth1 can talk to the windows system, but the world can't talk to the windows system.
 
Old 06-22-2003, 10:31 AM   #19
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Ah - sorry I assumed that your server had access to the net through linux already.
What happens when you run:
cat /proc/sys/net/ipv4/ip_forward

If it returns 0 then:
echo 1 > /proc/sys/net/ipv4/ip_forward

and try again.

Oh - and when you say windows has no access to the net - I take it that was after making sure that the default gateway was set to the ip of the linux box - yes?
 
Old 06-22-2003, 10:35 AM   #20
robiewp
LQ Newbie
 
Registered: Feb 2003
Distribution: Redhat 8.0, Slackware
Posts: 25

Original Poster
Rep: Reputation: 15
IP_Forward is already set to 1. I also added a line to sysctl.conf reading net.ipv4.ip_forward = 1

Yes, the gateway on the windows system is set to 192.168.0.1
 
Old 06-22-2003, 10:43 AM   #21
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Ok - something is odd here - what do the routing tables look like?
 
Old 06-22-2003, 10:56 AM   #22
robiewp
LQ Newbie
 
Registered: Feb 2003
Distribution: Redhat 8.0, Slackware
Posts: 25

Original Poster
Rep: Reputation: 15
route returns:

Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth1
10.255.255.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth1
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 10.255.255.1 0.0.0.0 UG 0 0 0 eth0

/etc/iproute2/rt_tables contains:

#
# reserved values
#
#255 local
#254 main
#253 default
#0 unspec

#
# local
#
#1 inr.ruhep



ip route returns:

192.168.0.0/24 dev eth1 scope link
10.255.255.0/24 dev eth0 proto kernel scope link src 10.255.255.5
169.254.0.0/16 dev eth1 scope link
127.0.0.0/8 dev lo scope link
default via 10.255.255.1 dev eth0
 
Old 06-22-2003, 01:58 PM   #23
robiewp
LQ Newbie
 
Registered: Feb 2003
Distribution: Redhat 8.0, Slackware
Posts: 25

Original Poster
Rep: Reputation: 15
when i do serivice --status-all one of the lines returned is:

ipchains: Incompatible with this kernel

I think i'm going to do a reinstall...
 
Old 06-22-2003, 02:05 PM   #24
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
ipchains? why are you using ipchains?
 
Old 06-22-2003, 02:55 PM   #25
robiewp
LQ Newbie
 
Registered: Feb 2003
Distribution: Redhat 8.0, Slackware
Posts: 25

Original Poster
Rep: Reputation: 15
I'm not using IP chains. That was just erroneous information.
 
Old 06-22-2003, 03:06 PM   #26
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Ah sorry I see it was a query to ipchains. That is just because it is installed. No need to worry.

I just can't figure this one out though. Your routing is fine. Forwarding is enabled and an iptables rule is in place and yet you still can't masq out or forward in.

How about trying to get this working one bit at a time.
With the windows server's gateway set to the linux boxes ip what happens if you:
ping www.linuxquestions.org
ping 64.179.4.146
 
Old 06-22-2003, 03:18 PM   #27
robiewp
LQ Newbie
 
Registered: Feb 2003
Distribution: Redhat 8.0, Slackware
Posts: 25

Original Poster
Rep: Reputation: 15
I can't ping linuxquestions.org from the windows box. I'll have my system setup later tonight on a T1 with a static+public IP. Maybe life will get simpler... and I'll reinstall more carefully.
 
Old 06-22-2003, 03:20 PM   #28
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Does that mean you can ping the ip address?
 
Old 06-22-2003, 08:20 PM   #29
robiewp
LQ Newbie
 
Registered: Feb 2003
Distribution: Redhat 8.0, Slackware
Posts: 25

Original Poster
Rep: Reputation: 15
I can ping the IP address from the linux machine. However, I cannot ping the IP from the windows machine. The reinstall's going to have to wait till tommorow. I forgot my CD-Rs []
 
Old 06-24-2003, 07:46 PM   #30
pembo13
Member
 
Registered: May 2003
Location: Caribbean
Distribution: Fedora Core2
Posts: 403

Rep: Reputation: 30
Just an additional question...

How can oen test if IPTABLES rules actually work properly, besides noticing that a particualr service doesn't work.

Thanks
 
  


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
Iptables problems with port forwarding jebaird Linux - Networking 3 08-05-2005 12:35 PM
iptables port forwarding problems JCdude2525 Linux - Networking 18 02-09-2005 04:25 PM
IPTable Problems (Port Forwarding)... Arch3Angel Linux - Security 3 12-04-2004 04:56 PM
NAT Port forwarding problems! nidputerguy Linux - Networking 4 01-31-2004 10:29 AM
Problems with port forwarding MS3FGX Linux - Networking 4 01-27-2004 03:22 PM

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

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