LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 02-28-2005, 08:40 AM   #1
ryanzietlow
LQ Newbie
 
Registered: Oct 2003
Posts: 26

Rep: Reputation: 15
port forward from eth0 to eth1


I am trying to allow access to webmin over the Internet. My network is setup as follows

Remote machine <-----> Router <-----> eth0 (Linux Box) eth1 <----> Internal network

I want to forward the webmin port 10000 from eth0 to eth1 so that i can remotely access webmin from the remote location.

I have port forwarding setup on the router but i do not know how to go about forwarding the port from eth0 to eth1. I am using dynamic ips on the remote end. Any suggestions?

Thanks
 
Old 02-28-2005, 03:19 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
If webmin is on the linux box just configure it to listen on all ips.
 
Old 02-28-2005, 04:17 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Here is a good paper on NAT. http://www.hasenstein.com/linux-ip-n...00000000000000

You can do this at the gateway setup dialog. You haven't indicated which distribution and kernel you are using. Most linuxes use iptables, which is part of Netfilter.

Your linux gateway will have a dialog for setting up the gateway ( although there may be a separate program for the Masquerade setup ). And since you are using Webmin on your system, I bet that may be what you used. You could run web min to administer the gateway computer locally to set up the masquerading (NAT) needed on the gateway to translate/forward the webmin (port 10000) traffic.

All of these tools rewrite the ipchains or iptables setup file which is loaded during startup. You probably use iptables if you have a 2.4 or later kernel.
 
Old 02-28-2005, 05:58 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Just a FYI. I would not recommend using webmin as a remote administration tool unless you run it in ssl mode or use a tunnel.
Webmin login and password are normally passed between your browser and the server in unencrypted form, an attacker with access to any of the networks between the browser and server can easily capture your Webmin login.

You will only need to forward port 10000 if the linux PC your connecting to is not the one in your diagram.
 
Old 02-28-2005, 07:41 PM   #5
ryanzietlow
LQ Newbie
 
Registered: Oct 2003
Posts: 26

Original Poster
Rep: Reputation: 15
The box in my diagram is the linux box running webmin. i try to point my browser to https://xxx.xxx.xxx.xxx and it gives me the routers setup console. I point my browser to xxx.xxx.xxx.xxx:10000 and it give me a connection refused page. Webmin is set up to allow all ips. My router gives eth0 a 10.x.x.x address while my internal addresses (eth1) are 90.x.x.x could this be causing the confusion?
I know that my isp is not blocking port 10000.
Is this something that I need to set up in iptables or by a gateway? That would be something I have not dealt with yet, so some help or turtorials would be great. Appreciate the time and help.
 
Old 02-28-2005, 09:07 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Can you access webmin from another networked PC?
 
Old 03-01-2005, 07:29 AM   #7
ryanzietlow
LQ Newbie
 
Registered: Oct 2003
Posts: 26

Original Poster
Rep: Reputation: 15
i can access webmin from inside my local network. but trying to access from outside (Internet) gives me this page:

ERROR
The requested URL could not be retrieved
-------------------------------------------------------------------------------

While trying to retrieve the URL: https://xxx.xxx.xxx.xxx:10000/

The following error was encountered:

Connection Failed
The system returned:

(111) Connection refused
The remote host or network may be down. Please try the request again.

Your cache administrator is root.
-------------------------------------------------------------------------------
Generated Tue, 01 Mar 2005 13:29:52 GMT by abvmschool (squid/2.5.STABLE1)


any thoughts?
 
Old 03-01-2005, 10:02 AM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Could be a firewill issue. Is one running on the linux box?
 
Old 03-01-2005, 10:08 AM   #9
ryanzietlow
LQ Newbie
 
Registered: Oct 2003
Posts: 26

Original Poster
Rep: Reputation: 15
i turned the firewall off on the linux box to try and figure this out.
could it have something to do with my modem/router. It is a aethra starbridge eb1030

could it be a squid issue?

Last edited by ryanzietlow; 03-01-2005 at 10:09 AM.
 
  


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
forwarding a specific port from eth0 to eth1 zovres Linux - Networking 2 05-02-2006 10:01 PM
x86 board PCM 6892 with dual ethernet port.eth1 doesnt ping if eth0 cable removed rani_162 Linux - Newbie 0 07-23-2005 12:29 PM
port forwarding from eth0 to eth1 ? overproof Linux - Networking 7 05-16-2005 02:48 AM
eth1 added, mysql connections FROM this machine are from eth1. Need bound to eth0??? kreese Linux - Networking 9 03-31-2004 12:12 PM
Kernel 2.4.22 finds eth0 and eth1 but 2.6.0 does not find eth1 coollink Linux - Networking 3 01-13-2004 07:32 PM

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

All times are GMT -5. The time now is 01:18 AM.

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