LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-26-2004, 09:52 AM   #16
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69

Looks like your interfaces are reversed (normally your external interface will be eth0):

EXTIF="eth1"
INTIF="eth0"

So the preouting rule should be:

$IPTABLES -t nat -A PREROUTING -d yyy.yyy.yyy.yyy -i eth1 -p tcp -m tcp --dport 80 -j DNAT --to-destination xxx.xxx.xxx.xxx

Looks like you made the proper modifications to the forwarding rules already, so they should be ok. Also make sure that the internal webserver's firewall is not blocking requests and that the webserver application (Apache, tux,etc) is up and running.
 
Old 04-28-2004, 10:05 AM   #17
Raphael_T
LQ Newbie
 
Registered: Oct 2003
Distribution: Mandrake 9.1, Red Hat 7.3
Posts: 21

Original Poster
Rep: Reputation: 15
I tried to connect to my webserver in the network, and it's fine. But when i try over the internet, it doesn't work.

If anybody could help me. it would be very helpful. I did what everyone told me to do
 
Old 04-28-2004, 03:08 PM   #18
Raphael_T
LQ Newbie
 
Registered: Oct 2003
Distribution: Mandrake 9.1, Red Hat 7.3
Posts: 21

Original Poster
Rep: Reputation: 15
I replaced these commands in the script:

#Enter configuration rules here
$IPTABLES -t nat -A PREROUTING -d yyy.yyy.yyy.yyy -i eth0 -p tcp -m tcp --dport 80 -j DNAT --to-destination xxx.xxx.xxx.xxx

$IPTABLES -A FORWARD -i eth1 -o eth0 -p tcp --dport 80 -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT

$IPTABLES -A FORWARD -i eth0 -o eth1 -j ACCEPT

$IPTABLES -t nat -A POSTROUTING -s xxx.xxx.xxx.xxx -j SNAT --to-source yyy.yyy.yyy.yyy


By these:

$IPTABLES -t nat -A PREROUTING -d yyy.yyy.yyy.yyy -p tcp --dport 80 -j DNAT --to-destination xxx.xxx.xxx.xxx:80

$IPTABLES -A FORWARD -i ppp0 -o eth0 -p tcp --destination-port 80 -m state --state NEW,ESTABLISHED -j ACCEPT

$IPTABLES -A FORWARD -o ppp0 -i eth0 -p tcp --source-port 80 -m state --state ESTABLISHED -j ACCEPT

where xxx.xxx.xxx.xxx is my internal address
where yyy.yyy.yyy.yyy is my internet address



thanks for all the help you did give me.
 
  


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
webserver behind firewall and squid ultraav Linux - Networking 6 06-17-2004 05:08 PM
IPTABLES and local Webserver mpgram Linux - Security 4 05-06-2004 12:11 PM
where does it go? sshd firewall or webserver? piratebiter Linux - Security 4 09-14-2003 10:41 AM
Need Advice - Webserver and Firewall Setup nbin Linux - Networking 8 06-17-2003 07:55 AM
Mandrake webserver on NT network behind firewall slipsy Linux - Networking 1 02-10-2003 11:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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