LinuxQuestions.org
Help answer threads with 0 replies.
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 01-05-2002, 05:53 PM   #1
daromer
LQ Newbie
 
Registered: Jan 2002
Posts: 1

Rep: Reputation: 0
IPtables +NAT


Hi!
I have an Linux server hosting 1 internetconnection to some other computers in an internal network
Everything is working fine and everyone can use the internet.

This is what i have used in my script.

# Generated by iptables-save v1.2.1a on Sun Jan 6 00:53:38 2002
*nat
:PREROUTING ACCEPT [228:17791]
:POSTROUTING ACCEPT [12:708]
:OUTPUT ACCEPT [13:841]

-A PREROUTING -d "my external ip" -p tcp -m tcp --dport 20000 -j DNAT --to-destination 192.168.10.6:21

-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT
# Completed on Sun Jan 6 00:53:38 2002
# Generated by iptables-save v1.2.1a on Sun Jan 6 00:53:38 2002
*filter
:INPUT ACCEPT [20:2848]
:FORWARD ACCEPT [42364:42333238]
:OUTPUT ACCEPT [5:240]
-A FORWARD -i eth1 -o eth0 -j ACCEPT
COMMIT
# Completed on Sun Jan 6 00:53:38 2002

Itīs a very simple script.
The problem is this:
I have a ftp server on the internal network that i want to connect to from the outside. But when i try to connect i always get connection refused!!!
Have i closed that port or what?????
I realy hope that someone outthere can help me!!
 
Old 01-07-2002, 11:15 AM   #2
d3funct
Member
 
Registered: Jun 2001
Location: Centralia, WA
Posts: 274

Rep: Reputation: 31
You may have to enable support for connection tracking of FTP.

/sbin/modprobe ip_conntrack_ftp

This will track all ftp connections made as part of IPtables "statefullness".
 
  


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
IPTables 1:1 NAT Garak Linux - Security 13 12-19-2011 05:03 PM
iptables nat kernelvn Linux - Networking 5 05-03-2005 11:39 AM
IPTABLES : build NAT using IPTABLES joseph Linux - Networking 4 04-23-2004 05:08 AM
iptables and NAT arrruken Linux - Networking 8 10-03-2003 04:17 AM
iptables NAT issue. onina Linux - Networking 1 02-26-2003 04:58 AM

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

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