You are not logged in.
edit: sorry, the answer is ppp0. i was using eth0, and this is what has been causing me a lot of frustration.
when Im going to do masquerading through iptables, and Im using pppoe (adsl), should my internet connection be referenced as eth0 or ppp0?
im trying to follow a tutorial about masquerading, but i dont know what to use. i think adsl is a kind of pseudo-dial-up:
from the tutorial:
Assuming external internet card is eth0, and external IP is 123.12.23.43 and the internal network card is eth1, then:
$> modprobe ipt_MASQUERADE # If this fails, try continuing anyway
$> iptables -F; iptables -t nat -F; iptables -t mangle -F
$> iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to 123.12.23.43
$> echo 1 > /proc/sys/net/ipv4/ip_forwardOr for a dial-up connection:
$> modprobe ipt_MASQUERADE # If this fails, try continuing anyway
$> iptables -F; iptables -t nat -F; iptables -t mangle -F
$> iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
$> echo 1 > /proc/sys/net/ipv4/ip_forward
this is my ifconfig output:
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:C0:26:7B:5C:83
inet6 addr: fe80::2c0:26ff:fe7b:5c83/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3407 errors:0 dropped:0 overruns:0 frame:0
TX packets:3609 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2297030 (2.1 Mb) TX bytes:617705 (603.2 Kb)
Interrupt:11 Base address:0xc000
eth1 Link encap:Ethernet HWaddr 00:E0:4C:C9:F0:53
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::2e0:4cff:fec9:f053/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:468 (468.0 b)
Interrupt:10 Base address:0xe000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
ppp0 Link encap:Point-to-Point Protocol
inet addr:58.96.112.48 P-t-P:210.5.96.254 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:3123 errors:0 dropped:0 overruns:0 frame:0
TX packets:3321 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:2209131 (2.1 Mb) TX bytes:527164 (514.8 Kb)
Offline