LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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-04-2004, 09:16 PM   #1
larry
LQ Newbie
 
Registered: Mar 2004
Location: chicago
Distribution: Fedora 2, Slackware 9.1, Debian 3.0
Posts: 16

Rep: Reputation: 0
port forwarding question


Alright I scoured the internet and web boards before asking this.

I have a static ip address assigned to me from my ISP( 24.148.30.178 ) and I registered a domain name for this ip ( lawrencelane.org ). I have a server that act as a router on my network:

eth0 = local
eth1 = internet

I have my web server on another server on my local network. I have DNS and all that correctly configured. Here are my current configuration for my firewall firewall (i cant take credit for creating this. I found it on the web, but it does exactly what i want it to!!)

Here are some dumps as well (from the routing server):

# ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:BA:85:A6:3D
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:80951 errors:0 dropped:0 overruns:0 frame:0
TX packets:87422 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:9525400 (9.0 Mb) TX bytes:72139939 (68.7 Mb)
Interrupt:9 Base address:0x9f00

eth1 Link encap:Ethernet HWaddr 00:A0:CC:36:E0:F6
inet addr:24.148.30.178 Bcast:255.255.255.255 Mask:255.255.255.224
UP BROADCAST NOTRAILERS RUNNING MTU:1500 Metric:1
RX packets:1483631 errors:0 dropped:0 overruns:0 frame:0
TX packets:58630 errors:1 dropped:0 overruns:0 carrier:2
collisions:20386 txqueuelen:100
RX bytes:154143293 (147.0 Mb) TX bytes:7321626 (6.9 Mb)
Interrupt:10 Base address:0xdc00

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:9268 errors:0 dropped:0 overruns:0 frame:0
TX packets:9268 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1201457 (1.1 Mb) TX bytes:1201457 (1.1 Mb)

# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
24.148.30.160 0.0.0.0 255.255.255.224 U 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 24.148.30.161 0.0.0.0 UG 0 0 0 eth1

* this is the weird one. this is from my log. 192.168.1.254 is the ip of the server with the web server. you can see it is requested with the correct ip and destination port. why is it not sending it back out?? the src ip is my cell phone, its what i use for testing. (wap is enabled on apache and the page does work):
IN=eth1 OUT=eth0 SRC=216.155.165.240 DST=192.168.1.254 LEN=48 TOS=0x00 PREC=0x00 TTL=47 ID=58377 DF PROTO=TCP SPT=47651 DPT=80 WINDOW=24820 RES=0x00 SYN URGP=0

here is the error message I get on my phone: "Gateway received an invalidresponse from the upstream gateway."

spects:
slackware 8.0
kernel 2.4.22

--larry
 
Old 06-05-2004, 06:41 PM   #2
larry
LQ Newbie
 
Registered: Mar 2004
Location: chicago
Distribution: Fedora 2, Slackware 9.1, Debian 3.0
Posts: 16

Original Poster
Rep: Reputation: 0
ok in my rush to figure this out i realized i didnt really ask a question.

the question is why can i not access my web server on my local network. you can see in the tcpdump that the server is being queried but it is not sending the page (err sumthin).

there are a few posts about this but they only go half way. has anyone had success with this?

--larry
 
Old 06-10-2004, 11:34 AM   #3
larry
LQ Newbie
 
Registered: Mar 2004
Location: chicago
Distribution: Fedora 2, Slackware 9.1, Debian 3.0
Posts: 16

Original Poster
Rep: Reputation: 0
In case anyone else reads this post, I did figure it out. The issue was in my a FORWARD rule. As you can see here:

Code:
$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -m state --state ESTABLISHED,RELATED  -j ACCEPT
just had to add a NEW to it:

Code:
$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -m state --state NEW,ESTABLISHED,RELATED  -j ACCEPT
works great!!

--larry
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Port Forwarding Question caps_phisto Linux - Networking 1 07-10-2005 11:33 PM
Port forwarding question linuxpyro Linux - Networking 3 10-22-2004 09:13 PM
Port forwarding question GUIPenguin Linux - Networking 1 10-12-2004 02:30 PM
Port forwarding question Doolspin Linux - Networking 2 09-03-2004 11:11 PM
Question about Ip/Port Forwarding Half_Elf Linux - Networking 3 10-14-2002 03:47 PM


All times are GMT -5. The time now is 09:11 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration