LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-02-2002, 10:57 PM   #1
roueleader
LQ Newbie
 
Registered: Feb 2002
Posts: 1

Rep: Reputation: 0
Unhappy port forwarding problem


I am running a smoothwall firewall 0.9.9 SE
I am trying to port forward port 80 to my web server
I have setup all the port forwarding and external services,
however I still cannot get to my web site from my RED network
I can get to it from my Green Network,
My web server is on a redhat 7.2 system running the apache web server.
 
Old 02-03-2002, 12:26 AM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
we may need to know what red and green networks are associated with

here is my forwarding rule

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to 10.0.0.2

as you can see it will forward the outside traffic on eth0 to the other machine but it will not forward it from the lan side on eth1

so from the lan I access the machine itself.

from the internet you would access the other machine
 
Old 02-20-2002, 10:59 AM   #3
pluggen
LQ Newbie
 
Registered: Feb 2002
Location: Leiden, Holland
Distribution: Slackware 8, SmoothWall 0.9.9
Posts: 3

Rep: Reputation: 0
i don't really understand what you are saying now...

I'm having the same problem, under the services tab i defined that tcp port 80 should be forwarded to ip 192.168.0.2:80... from the green network i can access the orange server, but i cannot acces my orange server from the internet...

config:
GREEN --> 10.0.0.x (subnet 255.255.0.0)
ORANGE-->192.168.0.x (subnet 255.255.0.0)
Smoothwall can ping the orange server
When pinging from orange machine i get:
Reply from 192.168.0.1: Destination port unreachable.
I double checked the tcp/ip settings on both machines, and those are fine.

 
Old 02-20-2002, 08:14 PM   #4
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
not being able to ping the machine may be a firewall issue.

otherwise maybe another rule is superceeding the port 80 forwarding rule.


move the deny rules to the bottom
 
Old 02-21-2002, 04:12 AM   #5
pluggen
LQ Newbie
 
Registered: Feb 2002
Location: Leiden, Holland
Distribution: Slackware 8, SmoothWall 0.9.9
Posts: 3

Rep: Reputation: 0
there are no deny rules (for what i thought)....i just left the firewall alone after installation...


what do U suggest?
 
Old 02-21-2002, 08:39 AM   #6
pluggen
LQ Newbie
 
Registered: Feb 2002
Location: Leiden, Holland
Distribution: Slackware 8, SmoothWall 0.9.9
Posts: 3

Rep: Reputation: 0
all is working fine now!
 
Old 06-09-2002, 03:45 PM   #7
redur
LQ Newbie
 
Registered: Jun 2002
Posts: 2

Rep: Reputation: 0
Pluggen - what did u do to fix the broblem?
 
Old 06-10-2002, 06:01 PM   #8
tontod
LQ Newbie
 
Registered: May 2002
Distribution: Redhat 7.3
Posts: 7

Rep: Reputation: 0
port forwarding

David Phillips: This is a simple question, but how do you forwarding multiple ports? Do you have to write a small script or something?
 
Old 06-11-2002, 04:36 PM   #9
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
just make a rule for each port with the port and what machine to forward it to
 
Old 06-11-2002, 04:44 PM   #10
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
Here's an example of one rule for multiple ports


$IPTABLES -A udpincoming_packets -p UDP -s 0/0 --source-port 2001:2025 -j ACCEPT
$IPTABLES -t nat -A PREROUTING -d 0/0 -p udp --destination-port 2001:2025 -i INET_IFACE -j DNAT --to 192.168.0.4
#

here's another
$IPTABLES -t nat -A PREROUTING -d 0/0 -p udp --destination-port 32766:32809 -i INET_IFACE -j DNAT --to 192.168.0.5
 
  


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
IPCHAINS port forwarding and IPTABLES port forwarding ediestajr Linux - Networking 26 01-14-2007 07:35 PM
Problem with Port Forwarding Zorrocaesar Linux - Networking 1 10-25-2005 07:18 AM
Problem with Port forwarding :( aronnok Linux - Networking 2 04-06-2005 02:16 PM
port forwarding problem bruj3w Linux - Networking 3 08-13-2004 08:13 PM
port forwarding problem syrtsardo Linux - Networking 6 07-19-2004 01:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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