LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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
 
LinkBack Search this Thread
Old 04-06-2008, 11:47 AM   #1
yourfriend
LQ Newbie
 
Registered: Apr 2008
Posts: 8

Rep: Reputation: 0
error message: In=eth3 OUT=eth3 SRc=10.0.0....


Hello friends,

I have big torubles all day about portforwording.

I cant help my self anymore.

I have an debian server with two netcards:

eth4 is going online through dsl --> ppp0

eth3 is the card for the local network connected through a switch. It has the ip 10.0.0.10


The only thing I want is that a incomming connection from ppp0 on from port2668 will forwarded to my 2nd computer with the IP 10.0.0.23


My routing scipt:
PHP Code:
route add 255.255.255.255 eth3

echo "1" > /proc/sys/net/ipv4/ip_forward
echo > /proc/sys/net/ipv4/ip_forward

iptables 
-A POSTROUTING -s 10.0.0.0/255.255.255.0 -j MASQUERADE


#iptables -A PREROUTING -t nat -i eth3 -p tcp --dport 668 -j DNAT --to 10.0.0.23:668
#iptables -A INPUT -p tcp -m state --state NEW --dport 668 -i eth3 -j ACCEPT 

My Script for the Forwording part:
PHP Code:
PORT=8668
TARGET_PORT
=2668
DMZ_IP
=10.0.0.23
DMZ_IF
=eth3

/sbin/iptables -A PREROUTING -t nat -p tcp --dport $PORT -i ppp0 -j DNAT --to $DMZ_IP:$TARGET_PORT
/sbin/iptables -A FORWARD -p tcp -d $DMZ_IP --dport $TARGET_PORT -i ppp0 -o $DMZ_IF -j ACCEPT
/sbin/iptables -A FORWARD -p tcp -s $DMZ_IP --sport $PORT -i $DMZ_IF -o ppp0 -j ACCEPT 

But there are messages likes this:
PHP Code:
Apr  6 20:48:29 localhost kernelIN=eth3 OUT=eth3 SRC=10.0.0.24 DST=10.0.0.23 LEN=48 TOS=0x00 PREC=0x00 TTL=127 ID=58887 DF PROTO=TCP SPT=2296 DPT=2668 WINDOW=65535 RES=0x00 SYN URGP=0
Apr  6 20
:48:29 localhost kernelIN=eth3 OUT=eth3 SRC=10.0.0.24 DST=10.0.0.23 LEN=48 TOS=0x00 PREC=0x00 TTL=127 ID=58888 DF PROTO=TCP SPT=2297 DPT=2668 WINDOW=65535 RES=0x00 SYN URGP=0
Apr  6 20
:48:29 localhost kernelIN=eth3 OUT=eth3 SRC=10.0.0.24 DST=10.0.0.23 LEN=48 TOS=0x00 PREC=0x00 TTL=127 ID=58889 DF PROTO=TCP SPT=2298 DPT=2668 WINDOW=65535 RES=0x00 SYN URGP=0
Apr  6 20
:48:29 localhost kernelIN=eth3 OUT=eth3 SRC=10.0.0.24 DST=10.0.0.23 LEN=48 TOS=0x00 PREC=0x00 TTL=127 ID=58890 DF PROTO=TCP SPT=2299 DPT=2668 WINDOW=65535 RES=0x00 SYN URGP=

Perhaps it has to do with my iptable:
PHP Code:
localhost:~# iptables -L
Chain INPUT (policy DROP)
target     prot opt source               destination
ACCEPT     0    
--  anywhere             anywhere
LOG        0    
--  loopback/8           anywhere            LOG level warning
DROP       0    
--  loopback/8           anywhere
ACCEPT     0    
--  anywhere             255.255.255.255
ACCEPT     0    
--  10.0.0.0/8           anywhere
ACCEPT    
!tcp  --  anywhere             BASE-ADDRESS.MCAST.NET/4
LOG        0    
--  10.0.0.0/8           anywhere            LOG level warning
DROP       0    
--  10.0.0.0/8           anywhere
ACCEPT     0    
--  anywhere             255.255.255.255
ACCEPT     0    
--  anywhere             222.221.180.181
LOG        0    
--  anywhere             anywhere            LOG level warning
DROP       0    
--  anywhere             anywhere

Chain FORWARD 
(policy ACCEPT)
target     prot opt source               destination
ACCEPT     0    
--  10.0.0.0/8           anywhere
ACCEPT     0    
--  anywhere             anywhere            state RELATED,ESTABLISHED
LOG        0    
--  anywhere             10.0.0.0/8          LOG level warning
DROP       0    
--  anywhere             10.0.0.0/8
LOG        0    
--  anywhere             anywhere            LOG level warning
DROP       0    
--  anywhere             anywhere
ACCEPT     0    
--  anywhere             anywhere
ACCEPT     tcp  
--  anywhere             10.0.0.23           multiport dports 2668
ACCEPT     tcp  
--  anywhere             10.0.0.23           multiport dports 2668
ACCEPT     tcp  
--  anywhere             10.0.0.23           multiport dports 2668

Chain OUTPUT 
(policy DROP)
target     prot opt source               destination
ACCEPT     0    
--  anywhere             anywhere
ACCEPT     0    
--  anywhere             255.255.255.255
ACCEPT     0    
--  anywhere             10.0.0.0/8
ACCEPT    
!tcp  --  anywhere             BASE-ADDRESS.MCAST.NET/4
LOG        0    
--  anywhere             10.0.0.0/8          LOG level warning
DROP       0    
--  anywhere             10.0.0.0/8
ACCEPT     0    
--  anywhere             255.255.255.255
ACCEPT     0    
--  222.221.180.181      anywhere
LOG        0    
--  anywhere             anywhere            LOG level warning
DROP       0    
--  anywhere             anywhere 
I already wasted more than 6 hours, but I havent solved it yet.

So I kneed your help brothers.


I did it before, without any trouble.
But know with 2 netcards I have lors of troubles.
By the wat the internet connection card eth4 dont have any ip.



Good bye

Last edited by yourfriend; 04-06-2008 at 11:50 AM.
 
Old 04-06-2008, 11:51 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 39,853

Rep: Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121
those aren't errors, just notices... where does it say something is wrong? you have LOG targets in there so it's hardly surprising things are being logged is it?
 
Old 04-06-2008, 11:59 AM   #3
yourfriend
LQ Newbie
 
Registered: Apr 2008
Posts: 8

Original Poster
Rep: Reputation: 0
because I cant connect to my server on the second pc.
so there should be anything wrong.

I want to connect to my server through the internet.

When I make a direct connect to it(10.0.0.23:2668) than it works, but I want to make a port forwarding and want to connect from remote.
 
Old 04-06-2008, 08:18 PM   #4
yourfriend
LQ Newbie
 
Registered: Apr 2008
Posts: 8

Original Poster
Rep: Reputation: 0
I must have a mistake with my port forwarding script.

Could anybody tell wahts wrong?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to reset eth2 eth3 on SUSE ??? achulxp Linux - Hardware 2 12-31-2006 01:30 AM
Strange Repeating Error message in /var/log/message lucktsm Linux - Security 2 10-27-2006 08:29 AM
compilation error for v0.9.2-1.src.rpm hueofwind Linux - Software 2 06-12-2006 10:53 PM
updatign nv drivers states need precompiles kernel src i have src and headers no joy gonus Debian 6 10-31-2004 10:21 AM
error with installing src.rpm morningstar665 Linux - Software 5 11-23-2003 12:56 PM


All times are GMT -5. The time now is 08:39 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration