hey guys plz need some help here
i want to share may internet on my lan
i have 2 ethernet cards :local and public
the internet from my isp is broadband (user: ali ,pass:321)
and i want to make a pppoe server so i have done the following:
added addresses to the interfaces
ip address add address 10.0.0.217/24 interface Public
ip address add address 192.168.0.254/24 interface Local
ip firewall nat add chain=srcnat action=masquerade out-interface=Public
now the pppoe client provided for me from my isp (user: ali ,pass: 321)
my clients can connect to the server and the pppoe out also can connect to the isp
iam missing something because i cant access the internet from local
and thx in advance
Your masquerading / srcnat does not work because the rule
ip firewall nat add chain=srcnat action=masquerade out-interface=Public
specifies the wrong out-interface.
You’re running a pppoe-client on your public interface towards your ISP,
therefore the interface that will carry your outgoing traffic will be your
pppoe-client interface and not the (physical) public interface.
Also, if all you do on the public interface is pppoe then you should not
assign any IP address to the public interface itself for security reasons.
there should be always a gateway if you want to access internet. ask your isp for the dns and gateway or if they are using dhcp configure your system for dhcp.
yes iam running a pppoe clinet on the public interface
and what should i add to dns because it is empty
and here is the route print
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, b - bgp, o - ospf
# DST-ADDRESS PREF-SRC G GATEWAY DISTANCE INTERFACE
0 ADC 172.16.221.1/32 172.16.221.7 pppoe-out1
1 ADC 192.168.0.0/24 192.168.0.254 local
2 A S 0.0.0.0/0 r 172.16.221.1 pppoe-out1
3 D 0.0.0.0/0 r 172.16.221.1 1 pppoe-out1