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 04-28-2016, 09:18 AM   #1
ARKSLACKBOX
LQ Newbie
 
Registered: Apr 2016
Posts: 3

Rep: Reputation: Disabled
Using NAT to forward incoming FTP to a spesifed IP


I added the following two lines in my rc.firewall script to open for incoming FTP to a NAS box on the inside.

The lines:

iptables -t nat -A PREROUTING -p tcp --dport 21 -i <eth0> -j DNAT --to-destination <destination-IP>
iptables -t nat -A PREROUTING -p tcp --dport 20 -i <eth0> -j DNAT --to-destination <destination-IP>


unfortunately aftre reboot my internet didn't work. Can smoebody give me a clue what I did wrong?
 
Old 04-28-2016, 04:11 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,137

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
Did it come back when you removed the two lines?
 
Old 04-29-2016, 02:33 AM   #3
ARKSLACKBOX
LQ Newbie
 
Registered: Apr 2016
Posts: 3

Original Poster
Rep: Reputation: Disabled
Hi smallpond,
Yes when I removed the two lines the internet started to work again. I discovered what was the problem. Earlier in the script I had made a rule that was in conflict with thees two new lines. It was actually a rule that blocked all inbound traffic. I corrected this and now it is working the internet and the ftp forwarding.

Thank you for your help.

ARK.
 
  


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
exim .forward: filtering incoming email CBM200 Linux - Server 0 06-28-2015 01:44 PM
How Can I forward all incoming Traffic to other address? hack3rcon Linux - Networking 18 03-29-2015 10:04 AM
Incoming mail service with .forward processing frank09 Linux - Server 2 01-07-2009 07:37 AM
Forward incoming requests to another server ajaimes Linux - Networking 4 06-04-2007 01:43 PM
FC4 forward specific incoming connections Letheli Linux - Networking 4 12-27-2005 04:36 AM

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

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