Results 1 to 7 of 7

Thread: Where does the WL700g do NAT?

  1. #1

    Where does the WL700g do NAT?

    After browsing google for a while, it appears to me that it's common under linux to do NAT via iptables. After looking at /tmp/firewall_rules, I noticed that no rule exists to divert packets into the nat table (via -t nat).

    Does anyone know where the box is actually doing the NAT function?

    Most all of my experience comes from FreeBSD, which is not very helpful here since iptables / ipfw + divert sockets are quite different.

    - K.C.

    P.S. After further though, this should probably have been posted in Q&A since there are a lot of custom firmware questions there, but I'll see what happens here.
    Last edited by kfurge; 08-01-2007 at 18:26. Reason: Added P.S.

  2. #2
    If anyone cares, I figured it out. To look at the NAT tables, you need to do "iptables -t nat --list".

    The files /tmp/nat_rules and /tmp/nat_forward_rules (DUH!) show what the firmware fed into iptables.

    I'm probably the last person to know that doing "iptables --list" only shows the standard firewall rules... ;-)

    - K.C.

  3. #3

    iptables rules

    You can use "iptables -L " to see the iptable list , more detail can use "iptables -h",

    Or see the iptables rules in /tmp/filter_rules. but where is the file which load on booting ? i also don't know when i try to found out the file yesterday.If anybody know , please let me know becase i want to open some ports for special software. I need telnet into router and type the rules each time.

  4. #4
    Yes. -L is the same as --list. However, that alone did not show me the nat tables. To see them, you need to add "-t nat" to "-L".

    Regarding your port forwarding, I'm currently configuring this through the web interface. Go into Advanced->Nat->DMZ. Type in the WAN port you want redirected, then the internal IP and port to redirect to.

    For instance, I'm redirecting incoming WAN port 80 to internal LAN port 192.168.1.1:8081 and WAN port 22 to 192.168.1.1:22. If you don't fill out the WAN port IP address, which can change with DHCP, the NAT rule will default to "anywhere".

    Now on my box, both web serving and ssh are accessable from the outside. I confirmed the iptables rules are what I expected.

    - K.C.

  5. #5
    Quote Originally Posted by hmantsao View Post
    You can use "iptables -L " to see the iptable list , more detail can use "iptables -h",

    Or see the iptables rules in /tmp/filter_rules. but where is the file which load on booting ? i also don't know when i try to found out the file yesterday.If anybody know , please let me know becase i want to open some ports for special software. I need telnet into router and type the rules each time.
    edit kfurge's rc.local and add (at the end):

    iptables -I INPUT -p tcp --dport INSERT-YOUR-PORT-NUMBER-HERE -j ACCEPT

    for a detailed iptables description, check http://www.linuxguruz.com/iptables/howto/
    for a quick intro, check http://www.cse.msu.edu/~minutsil/iptables.html
    Last edited by costinel; 16-01-2007 at 21:18.

  6. #6
    Quote Originally Posted by kfurge View Post
    Now on my box, both web serving and ssh are accessable from the outside. I confirmed the iptables rules are what I expected.
    How are you running a sshd daemon on your WL-700gE ?

  7. #7
    you have to install a the custom firmware from kfurge. look at

    http://www.wl500g.info/showthread.php?t=7109

    http://home.comcast.net/~kfurge/wl700ge.html

    grat182

Similar Threads

  1. How to run two webservers
    By sesamebike in forum WL-500g/WL-500gx Tutorials
    Replies: 36
    Last Post: 13-03-2007, 08:05
  2. port forwarding disappears
    By IAmLeX in forum WL-500g Q&A
    Replies: 2
    Last Post: 27-08-2006, 17:12
  3. Doppelte Firewall / Nat ??
    By Bratwurst in forum German Discussion - Deutsch (DE)
    Replies: 1
    Last Post: 26-02-2006, 17:09

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •