Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have attempted numerous times to get some results with the following configuration, but have yet to get any progress to measure if I am on the right track.
I just rebuilt this box after making it very unstable
I am running Mandrake 8.1 and the last install I did was with IPTABLES. I am running DNS and PostFix along with Apache on this box, and I am connected via ADSL and a static address is served to me and it is bound to 205.150.254.x (eth0). The second card is my private network 192.168.100.1 (eth1). I have my loopback 127.0.0.1(lo) and (ppp0) bound to 205.150.254.x. I have set up routing on this using machine using 192.168.100.1 ( I don't know if I need to do this?)
I also run an WIN2000 web server, and I have been using another dedicated ADSL connection with it. This does not work out as my ISP will reboot at his end a few times a week, and WIN2000 will not reconnect like Linux will. I want to drop that second account...
I have 2 nics in this WIN2000 server, and the local network is bound to 192.168.100.100.
I need to port forward port 80 from the outside internet connection (Mandrake), 205.150.254.x to the internal web server,(IIS5) 192.168.100.100 and I don't know about DNS and SMPT & POP.
I was told to keep my zone files for domains pointed at 205.150.254.x (Linux) and everything would work with port forwarding, but everything pointed back to my Name Server and all you would see would be my default Apache web page.
If someone could get me started this would be a great help, as I have spent a long time trying to figure out just what to do. I have tried several scripts, but without any results to let me know if I am progressing with this.
Would be cool if you posted *what* you tried instead of telling you you *tried*.
You need iptables
-t nat -A PREROUTING -i <pub eth> -p tcp -d <dest IPort> -j DNAT --to <lan IPort>
iptables -A FORWARD -i <pub eth in> -o <lan eth> -p tcp -d <Lan IPort> -j ACCEPT
iptables -t nat -A POSTROUTING -o <pub eth> -j SNAT --to-source <Lan IP>
Thank you but at this point I do not have enough background to answer any questions on Forward Policy.
I think I have to forward my internet IP, (eth0) to my second nic (eth1) 192.168.100.1 - on the linux box, and then to my web server IIS5 defined as 192.168.100.100.
At this point I do not know where packets are ending up, and how to check where things are going, and then deal with DNS, and the Mail Server which are on the linux box as well.
If I knew how to check these things I may be able to understand the tutorials better, logs, tools, etc.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.