You are not logged in.
I lost some config and forgot how to set this up. I have a dual nic arch box with some clients behind it. dnsmasq serves dhcp and dns on the LAN side (192.168.10.0/24). WAN port of arch box (192.168.1.201) talks to actual modem (192.168.1.1).
router
root@router ~ # ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:25:90:95:08:40 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.201/24 brd 192.168.1.255 scope global enp2s0
valid_lft forever preferred_lft forever
inet6 fe80::225:90ff:fe95:840/64 scope link
valid_lft forever preferred_lft forever
3: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:25:90:95:08:41 brd ff:ff:ff:ff:ff:ff
inet 192.168.10.1/24 brd 192.168.10.255 scope global enp3s0
valid_lft forever preferred_lft forever
inet6 fe80::225:90ff:fe95:841/64 scope link
valid_lft forever preferred_lft forever
root@router ~ # ip route
default via 192.168.1.1 dev enp2s0
192.168.1.0/24 dev enp2s0 proto kernel scope link src 192.168.1.201
192.168.10.0/24 dev enp3s0 proto kernel scope link src 192.168.10.1
root@router ~ # sysctl net.ipv4.ip_forward=1
net.ipv4.ip_forward = 1
root@router~ # ping archlinux.org
PING archlinux.org (66.211.214.131) 56(84) bytes of data.
64 bytes from gudrun.archlinux.org (66.211.214.131): icmp_seq=1 ttl=47 time=70.0 ms
64 bytes from gudrun.archlinux.org (66.211.214.131): icmp_seq=2 ttl=47 time=70.0 ms
client
root@lucid-desktop:~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
2: can0: <NOARP> mtu 16 qdisc noop state DOWN qlen 64
link/can
3: can1: <NOARP> mtu 16 qdisc noop state DOWN qlen 64
link/can
4: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
link/ether 00:1f:f2:09:19:89 brd ff:ff:ff:ff:ff:ff
inet 192.168.10.101/24 brd 192.168.10.255 scope global eth0
root@lucid-desktop:~# ip route
192.168.10.0/24 dev eth0 proto kernel scope link src 192.168.10.101
169.254.0.0/16 dev eth0 scope link metric 1000
default via 192.168.10.1 dev eth0 metric 100
root@lucid-desktop:~# nslookup archlinux.org
Server: 192.168.10.1
Address: 192.168.10.1#53
Non-authoritative answer:
Name: archlinux.org
Address: 66.211.214.131
root@lucid-desktop:~# ping archlinux.org
PING archlinux.org (66.211.214.131) 56(84) bytes of data.
*crickets*
root@lucid-desktop:~# wget archlinux.org
--2013-04-02 07:51:19-- http://archlinux.org/
Resolving archlinux.org... 66.211.214.131
Connecting to archlinux.org|66.211.214.131|:80...
Do I need iptables on? This is all with it off.
edit: yup
iptables -t nat -A POSTROUTING -o enp2s0 -j MASQUERADE
Last edited by tladuke (2013-06-06 19:37:44)
Offline