Re: [gentoo-user] ip forwarding question

2005-06-23 Thread A. Khattri
On Wed, 22 Jun 2005, askar ... wrote: Why I can't see www.mydomain.com from LAN? www.mydomain.com is registered at providers DNS server. Probably because your WAN interface never gets the packet. -- -- gentoo-user@gentoo.org mailing list

Re: [gentoo-user] ip forwarding question

2005-06-22 Thread askar ...
Thanks all for help. Let me make clear what I'd like to do: At home I have to PCs. PC1 is router. (eth0 for lan, eth1 for WAN, connected with ADSL modem) PC2 is another pc ina LAN. I'm planning to run web server on PC2 with ip address 192.168.0.2. The iptables scripts as follows:

Re: [gentoo-user] ip forwarding question

2005-06-22 Thread askar ...
On 6/22/05, A. Khattri [EMAIL PROTECTED] wrote: On Tue, 21 Jun 2005, askar ... wrote: Thanks, but I already have this script in my iptable rules. My router works for PC in LAN. But when I run in LAN PC www.mydomain.com http://www.mydomain.com it doesn't homepage. Though I can see web

Re: [gentoo-user] ip forwarding question

2005-06-22 Thread Daniel da Veiga
You mentioned you have a router, does it have port forwarding set and running? Can you see your domain from outside your LAN? Various ISPs block traffic to the 80, 23, 25, 22 and other ports. On 6/22/05, askar ... [EMAIL PROTECTED] wrote: On 6/22/05, A. Khattri [EMAIL PROTECTED] wrote: On Tue,

Re: [gentoo-user] ip forwarding question

2005-06-22 Thread Hans-Werner Hilse
Hi, On Wed, 22 Jun 2005 22:50:18 +0600 askar ... [EMAIL PROTECTED] wrote: Note that this should be better done in the ppp-connect script rather than here. The iptables should be set up at boot time, I'd suggest. So you're not imposing a (rather short) open firewall situation. In fact,

[gentoo-user] ip forwarding question

2005-06-21 Thread askar ...
Hello! I have to PCs. 1st one used as a router. On 2nd PC I have web server installed and would like to setup ip forwarding to the 2nd PC. In my iptables rule script I added the line: $IPTABLES -t nat -A PREROUTING -p tcp --dport 80 -i ppp0 -j DNAT --to 192.168.0.2 Where 192.168.0.2 is the ip

Re: [gentoo-user] ip forwarding question

2005-06-21 Thread Kurt Guenther
As root do: echo 1 /proc/sys/net/ipv4/ip_forward /sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE where eth0 is your outward facing port to your router. I've used ppp0 with a dial up connection, and that works too. --Kurt askar ... wrote: Hello! I have to PCs. 1st one

Re: [gentoo-user] ip forwarding question

2005-06-21 Thread Hans-Werner Hilse
Hi, On Tue, 21 Jun 2005 20:16:21 +0600 askar ... [EMAIL PROTECTED] wrote: I have to PCs. 1st one used as a router. Well, I think then you've already set up forwarding, like Kurt G. mentioned. On 2nd PC I have web server installed and would like to setup ip forwarding to the 2nd PC. In

Re: [gentoo-user] ip forwarding question

2005-06-21 Thread Ryan Viljoen
eth0 - connects to the lan # Set up IP FORWARDing and MASQUERADING iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE iptables --append FORWARD --in-interface eth0 -j ACCEPT echo 1 /proc/sys/net/ipv4/ip_forward4 That should do the job. Just make sure that all the

Re: [gentoo-user] ip forwarding question

2005-06-21 Thread askar ...
On 6/21/05, Kurt Guenther [EMAIL PROTECTED] wrote: As root do:echo 1 /proc/sys/net/ipv4/ip_forward/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADEwhere eth0 is your outward facing port to your router.I've used ppp0 with a dial up connection, and that works too. --KurtThanks, but I

Re: [gentoo-user] ip forwarding question

2005-06-21 Thread Hans-Werner Hilse
Hi, On Tue, 21 Jun 2005 21:22:35 +0600 askar ... [EMAIL PROTECTED] wrote: On 6/21/05, Kurt Guenther [EMAIL PROTECTED] wrote: As root do: echo 1 /proc/sys/net/ipv4/ip_forward /sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE where eth0 is your outward facing port to

Re: [gentoo-user] ip forwarding question

2005-06-21 Thread askar ...
I have to PCs. 1st one used as a router. Well, I think then you've already set up forwarding, like Kurt G. mentioned. Yes I did. A few ideas: - the FORWARD queue must also allow new connections from the outside (- i ppp0) to 192.168.0.2 (because PREROUTING modifies the packet before

Re: [gentoo-user] ip forwarding question

2005-06-21 Thread Hans-Werner Hilse
Hi, I'm gonna comment your script below... On Tue, 21 Jun 2005 22:13:48 +0600 askar ... [EMAIL PROTECTED] wrote: The iptables scripts as follows: - #!/bin/bash IPTABLES='/sbin/iptables' # Set interface values EXTIF='ppp0' INTIF1='eth0' #

Re: [gentoo-user] ip forwarding question

2005-06-21 Thread A. Khattri
On Tue, 21 Jun 2005, askar ... wrote: Thanks, but I already have this script in my iptable rules. My router works for PC in LAN. But when I run in LAN PC www.mydomain.com http://www.mydomain.com it doesn't homepage. Though I can see web page when I run http://localhost. No it won't. Because