LinuxQuestions.org
Visit Jeremy's Blog.
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 09-03-2004, 09:44 PM   #1
Doolspin
Member
 
Registered: Aug 2004
Location: Ohio
Distribution: Slackware 9.1/10/10.1 RedHat circa 2000, Knoppix, OpenSuse 10.0/10.1
Posts: 122

Rep: Reputation: 15
Port forwarding question


Alright... i have a painfully easy question i'm sure....
I have a DNS machine (slack9.1) with 2 eth's cards. I want a webserver i have another machine on my internal network (slack10) I need to know how to get the DNS to forward the requests on port 80 to the webserver. thanks in advance.
 
Old 09-03-2004, 10:03 PM   #2
zatriz
Member
 
Registered: Aug 2003
Location: Seattle, Wa
Distribution: Fedora,Trustix,Debian
Posts: 290

Rep: Reputation: 30
run these commands on the dns machine.
Be aware that this will not protect the dns machine by any means and you are better off putting a firewall on the dns machine as well if you haven't done so already.

type these commands as root

/sbin/iptables -t nat -A PREROUTING -p tcp -i eth0 -d xxx.xxx.xxx.xxx --dport 80 -j DNAT --to yyy.yyy.yyy.yyy:80

/sbin/iptables -A FORWARD -p tcp -i eth0 -d yyy.yyy.yyy.yyy --dport 80 -j ACCEPT

xxx.xxx.xxx.xxx is the ip address of the dns machine the machine thats connected to the internet

yyy.yyy.yyy.yyy is the ip of the machine that the webserver is running on .
 
Old 09-03-2004, 10:11 PM   #3
Doolspin
Member
 
Registered: Aug 2004
Location: Ohio
Distribution: Slackware 9.1/10/10.1 RedHat circa 2000, Knoppix, OpenSuse 10.0/10.1
Posts: 122

Original Poster
Rep: Reputation: 15
I already have a firewall up, when i put up the DNS. Thanks alot man, I just wasn't sure what i needed Thanks for the superfast reply too.
 
  


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 10:33 PM
Port forwarding question linuxpyro Linux - Networking 3 10-22-2004 08:13 PM
Port forwarding question GUIPenguin Linux - Networking 1 10-12-2004 01:30 PM
port forwarding question larry Linux - Networking 2 06-10-2004 10:34 AM
Question about Ip/Port Forwarding Half_Elf Linux - Networking 3 10-14-2002 02:47 PM

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

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